Skip to content

Commit 70eb2b6

Browse files
authored
[FLINK-36392] Build with target jdk
1 parent b3b45ba commit 70eb2b6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
name: Flink Kubernetes Operator CI
2424
on:
2525
push:
26+
branches:
27+
- main
28+
- release-*
2629
pull_request:
2730
jobs:
2831
test_ci:
@@ -163,7 +166,8 @@ jobs:
163166
export SHELL=/bin/bash
164167
export DOCKER_BUILDKIT=1
165168
eval $(minikube -p minikube docker-env)
166-
docker build --progress=plain --no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-latest --progress plain .
169+
export JAVA_VERSION=${{ matrix.java-version }}
170+
docker build --progress=plain --no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-latest --progress plain --build-arg JAVA_VERSION="${JAVA_VERSION:-11}" .
167171
docker images
168172
- name: Start the operator
169173
run: |

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
# limitations under the License.
1717
################################################################################
1818
# Build
19-
FROM maven:3.8.4-eclipse-temurin-11 AS build
19+
ARG JAVA_VERSION=11
20+
FROM maven:3.8.8-eclipse-temurin-${JAVA_VERSION} AS build
2021
ARG SKIP_TESTS=true
2122

2223
WORKDIR /app
@@ -33,7 +34,7 @@ RUN cd /app/tools/license; mkdir jars; cd jars; \
3334
cd ../ && ./collect_license_files.sh ./jars ./licenses-output
3435

3536
# stage
36-
FROM eclipse-temurin:11-jre-jammy
37+
FROM eclipse-temurin:${JAVA_VERSION}-jre-jammy
3738
ENV FLINK_HOME=/opt/flink
3839
ENV FLINK_PLUGINS_DIR=$FLINK_HOME/plugins
3940
ENV OPERATOR_VERSION=1.10-SNAPSHOT

0 commit comments

Comments
 (0)