diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34f025a4a6..93b828406d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,9 @@ name: Flink Kubernetes Operator CI on: push: + branches: + - main + - release-* pull_request: jobs: test_ci: @@ -163,7 +166,8 @@ jobs: export SHELL=/bin/bash export DOCKER_BUILDKIT=1 eval $(minikube -p minikube docker-env) - docker build --progress=plain --no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-latest --progress plain . + export JAVA_VERSION=${{ matrix.java-version }} + docker build --progress=plain --no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-latest --progress plain --build-arg JAVA_VERSION="${JAVA_VERSION:-11}" . docker images - name: Start the operator run: | diff --git a/Dockerfile b/Dockerfile index 0e36e63515..1af671b159 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,8 @@ # limitations under the License. ################################################################################ # Build -FROM maven:3.8.4-eclipse-temurin-11 AS build +ARG JAVA_VERSION=11 +FROM maven:3.8.8-eclipse-temurin-${JAVA_VERSION} AS build ARG SKIP_TESTS=true WORKDIR /app @@ -33,7 +34,7 @@ RUN cd /app/tools/license; mkdir jars; cd jars; \ cd ../ && ./collect_license_files.sh ./jars ./licenses-output # stage -FROM eclipse-temurin:11-jre-jammy +FROM eclipse-temurin:${JAVA_VERSION}-jre-jammy ENV FLINK_HOME=/opt/flink ENV FLINK_PLUGINS_DIR=$FLINK_HOME/plugins ENV OPERATOR_VERSION=1.10-SNAPSHOT