Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
name: Flink Kubernetes Operator CI
on:
push:
branches:
- main
- release-*
Comment on lines +26 to +28
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not strictly needed for this PR, but reduces the number of build jobs to wade through (especially useful when debugging). Happy to drop/move to a new PR if desired.

pull_request:
jobs:
test_ci:
Expand Down Expand Up @@ -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: |
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumps the maven version. I went for the oldest version which supports all three of the desired java versions. Could equally jump to the latest maven version (3.9.9 IIRC).

This is the core of the fix so that maven in the docker container actually builds with the desired JVM version.

ARG SKIP_TESTS=true

WORKDIR /app
Expand All @@ -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
Expand Down
Loading