Skip to content

Commit

Permalink
[FLINK-36392] Build with target jdk
Browse files Browse the repository at this point in the history
  • Loading branch information
SamBarker authored Oct 7, 2024
1 parent b3b45ba commit 70eb2b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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-*
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
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

0 comments on commit 70eb2b6

Please sign in to comment.