File tree Expand file tree Collapse file tree
buildSrc/src/main/groovy/org/apache/beam/gradle
runners/flink/job-server-container Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8080 docker buildx imagetools create --tag "${IMAGE}:latest" "${IMAGE}:${RELEASE}"
8181 done
8282
83+ # Flink 2 images have different tagging, add latest tag to latest supported Flink version
84+ echo "================Confirming Runner container Release and RC version==========="
85+ BEAM_FLINK_REPO=apache/beam_flink_job_server
86+ LATEST_FLINK_VERSION=$(wget -qO- https://raw.githubusercontent.com/apache/beam/refs/tags/v${RELEASE}-RC${RC_NUM}/gradle.properties | grep -E flink_versions | tr ',' '\n' | tail -1)
87+ docker buildx imagetools create --tag "${BEAM_FLINK_REPO}:latest" "${BEAM_FLINK_REPO}:${RELEASE}${RC_VERSION}-flink${LATEST_FLINK_VERSION}"
88+
8389 publish_python_artifacts :
8490 if : ${{github.event.inputs.PUBLISH_PYTHON_ARTIFACTS == 'yes'}}
8591 runs-on : [self-hosted, ubuntu-20.04, main]
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ class BeamDockerPlugin implements Plugin<Project> {
4848 String dockerComposeFile = ' docker-compose.yml'
4949 Set<Task > dependencies = [] as Set
5050 Set<String > tags = [] as Set
51+ String tagSuffix = null
5152 Map<String , String > namedTags = [:]
5253 Map<String , String > labels = [:]
5354 Map<String , String > buildArgs = [:]
@@ -100,7 +101,11 @@ class BeamDockerPlugin implements Plugin<Project> {
100101 }
101102
102103 Set<String > getTags () {
103- return this . tags + project. getVersion(). toString()
104+ def allTags = this . tags + project. getVersion(). toString()
105+ if (tagSuffix) {
106+ allTags = allTags. collect { it. endsWith(tagSuffix) ? it : it + tagSuffix }. toSet()
107+ }
108+ return allTags
104109 }
105110
106111 Set<String > getPlatform () {
Original file line number Diff line number Diff line change @@ -55,8 +55,10 @@ task copyDockerfileDependencies(type: Copy) {
5555def pushContainers = project. rootProject. hasProperty([" isRelease" ]) || project. rootProject. hasProperty(" push-containers" )
5656def containerName = project. parent. name. startsWith(" 2" ) ? " flink_job_server" : " flink${ project.parent.name} _job_server"
5757def containerTag = project. rootProject. hasProperty([" docker-tag" ]) ? project. rootProject[" docker-tag" ] : project. sdk_version
58+ String verInSuffix = null
5859if (project. parent. name. startsWith(" 2" )) {
5960 containerTag + = " -flink${ project.parent.name} "
61+ verInSuffix = " -flink${ project.parent.name} "
6062}
6163
6264docker {
@@ -68,6 +70,7 @@ docker {
6870 tag : containerTag)
6971 // tags used by dockerTag task
7072 tags containerImageTags()
73+ tagSuffix verInSuffix
7174 files " ./build/"
7275 buildx project. useBuildx()
7376 platform(* project. containerPlatforms())
You can’t perform that action at this time.
0 commit comments