Skip to content

Commit 6e047b0

Browse files
authored
ci(flink): support setting flink's version in the docker setup (ibis-project#8685)
1 parent 0a78414 commit 6e047b0

4 files changed

Lines changed: 12 additions & 7 deletions

File tree

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FLINK_VERSION=1.18.1

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ dist
4040
coverage.xml
4141

4242
# Environments
43-
.env
4443
.venv
4544
env/
4645
venv/

compose.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ services:
379379
- exasol:/data
380380

381381
flink-jobmanager:
382-
image: flink:1.18.1
382+
image: flink:${FLINK_VERSION}
383383
environment:
384384
FLINK_PROPERTIES: |
385385
jobmanager.rpc.address: flink-jobmanager
@@ -390,8 +390,11 @@ services:
390390
- flink
391391

392392
flink:
393-
build: ./docker/flink
394-
image: ibis-flink
393+
image: ibis-flink-${FLINK_VERSION}
394+
build:
395+
context: ./docker/flink
396+
args:
397+
FLINK_VERSION: ${FLINK_VERSION}
395398
environment:
396399
FLINK_PROPERTIES: |
397400
jobmanager.rpc.address: flink-jobmanager

docker/flink/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
FROM flink:1.18.1
1+
ARG FLINK_VERSION=1.18.1
2+
FROM flink:${FLINK_VERSION}
23

34
# ibis-flink requires PyFlink dependency
4-
RUN wget -nv -P $FLINK_HOME/lib/ https://repo1.maven.org/maven2/org/apache/flink/flink-python/1.18.1/flink-python-1.18.1.jar
5+
ARG FLINK_VERSION=1.18.1
6+
RUN wget -nv -P $FLINK_HOME/lib/ https://repo1.maven.org/maven2/org/apache/flink/flink-python/${FLINK_VERSION}/flink-python-${FLINK_VERSION}.jar
57

68
# install python3 and pip3
79
RUN apt-get update -y && \
@@ -12,4 +14,4 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
1214
# install PyFlink
1315
ARG BUILDARCH
1416
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-${BUILDARCH:-amd64}
15-
RUN pip3 install apache-flink==1.18.1
17+
RUN pip3 install apache-flink==${FLINK_VERSION}

0 commit comments

Comments
 (0)