chore(spark): add log4j fixes to 3.2.2 (#44) #101
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: | |
- master | |
- v* | |
pull_request: | |
branches: | |
- master | |
- v* | |
jobs: | |
build-and-release: | |
strategy: | |
matrix: | |
version: | |
- zeppelin: "0.10.1" | |
spark: "3.2.2" | |
hadoop: "3.3.1" | |
scala: "2.12" | |
java: "8" | |
- zeppelin: "0.10.1" | |
spark: "3.3.0" | |
hadoop: "3.3.2" | |
scala: "2.12" | |
java: "8" | |
- zeppelin: "0.10.1" | |
spark: "3.4.1" | |
hadoop: "3.3.4" | |
scala: "2.12" | |
java: "8" | |
fail-fast: true | |
runs-on: ubuntu-latest | |
env: | |
SELF_VERSION: "v5" | |
IMAGE_NAME: zeppelin | |
ZEPPELIN_VERSION: "${{ matrix.version.zeppelin }}" | |
SPARK_VERSION: "${{ matrix.version.spark }}" | |
HADOOP_VERSION: "${{ matrix.version.hadoop }}" | |
SCALA_VERSION: "${{ matrix.version.scala }}" | |
JAVA_VERSION: "${{ matrix.version.java }}" | |
steps: | |
- name: Set TAG_NAME as env var export | |
run: |- | |
SUFFIX_TAG="${ZEPPELIN_VERSION}_spark-${SPARK_VERSION}_hadoop-${HADOOP_VERSION}_scala-${SCALA_VERSION}_java-${JAVA_VERSION}" | |
TAG_NAME="${SELF_VERSION}_${SUFFIX_TAG}" | |
echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV | |
SELF_X_VERSION="$(echo ${SELF_VERSION} | cut -d . -f 1)" | |
X_TAG_NAME="${SELF_X_VERSION}_${SUFFIX_TAG}" | |
echo "X_TAG_NAME=${X_TAG_NAME}" >> $GITHUB_ENV | |
SELF_XY_VERSION="$(echo ${SELF_VERSION} | cut -d . -f 1,2)" | |
XY_TAG_NAME="${SELF_XY_VERSION}_${SUFFIX_TAG}" | |
echo "XY_TAG_NAME=${XY_TAG_NAME}" >> $GITHUB_ENV | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install tera-cli | |
run: |- | |
wget https://github.com/guangie88/tera-cli/releases/download/v0.4.1/tera-cli-v0.4.1-x86_64-unknown-linux-musl.tar.gz | |
tar xvf tera-cli-v0.4.1-x86_64-unknown-linux-musl.tar.gz | |
mv tera-cli-v0.4.1-x86_64-unknown-linux-musl/tera /tmp/tera | |
rm -rf tera-cli-v0.4.1-x86_64-unknown-linux-musl* | |
- name: Check differences between ci.yml and ci.yml.tmpl | |
run: |- | |
cp .github/workflows/ci.yml .github/workflows/ci.yml.backup | |
TERA=/tmp/tera ./templates/apply-vars.sh | |
if ! diff .github/workflows/ci.yml .github/workflows/ci.yml.backup; then echo "ci.yml.tmpl and ci.yml differs!" && exit 1; fi | |
- name: Build Dockerfile | |
run: |- | |
docker build . -t "${IMAGE_NAME}:${TAG_NAME}" \ | |
--build-arg "ZEPPELIN_VERSION=${ZEPPELIN_VERSION}" \ | |
--build-arg "SPARK_VERSION=${SPARK_VERSION}" \ | |
--build-arg "HADOOP_VERSION=${HADOOP_VERSION}" \ | |
--build-arg "SCALA_VERSION=${SCALA_VERSION}" \ | |
--build-arg "JAVA_VERSION=${JAVA_VERSION}" | |
- name: Test the built image | |
run: |- | |
docker run --rm --name zeppelin -p 8080:8080 -t -d "${IMAGE_NAME}:${TAG_NAME}" | |
sleep 25 | |
[ "`curl -s http://localhost:8080/api/version | jq -r .status`" = "OK" ] | |
docker rm -f zeppelin | |
- name: Push Docker image | |
run: bash push-images.sh | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
IMAGE_ORG: ${{ secrets.IMAGE_ORG }} | |
if: github.event_name == 'push' |