emilymye commented on a change in pull request #13517:
URL: https://github.com/apache/beam/pull/13517#discussion_r543751693
##########
File path: .test-infra/jenkins/job_Publish_SDK_Image_Snapshots.groovy
##########
@@ -41,12 +41,12 @@ job('beam_Publish_Beam_SDK_Snapshots') {
gradle {
rootBuildScriptDir(commonJobProperties.checkoutDir)
commonJobProperties.setGradleSwitches(delegate)
- tasks(':sdks:go:container:dockerPush')
+ tasks(':sdks:go:container:dockerTagPush')
SUPPORTED_JAVA_CONTAINER_TASKS.each { taskVer ->
- tasks(":sdks:java:container:${taskVer}:dockerPush")
+ tasks(":sdks:java:container:${taskVer}:dockerTagPush")
}
SUPPORTED_PYTHON_CONTAINER_TASKS.each { taskVer ->
- tasks(":sdks:python:container:${taskVer}:dockerPush")
+ tasks(":sdks:python:container:${taskVer}:dockerTagPush")
}
switches("-Pdocker-repository-root=${imageRepo}")
switches("-Pdocker-tag=${imageTag}")
Review comment:
```suggestion
switches("-Pdocker-tag-list=${imageTag},latest")
```
##########
File path: sdks/go/container/build.gradle
##########
@@ -53,6 +53,7 @@ docker {
root: project.rootProject.hasProperty(["docker-repository-root"]) ?
project.rootProject["docker-repository-root"] :
project.docker_image_default_repo_root)
+ tags containerImageTags()
Review comment:
Can you add comments that say this property only gets used by
dockerTagPush? I think it will be confusing otherwise.
##########
File path:
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
##########
@@ -1704,6 +1704,20 @@ class BeamModulePlugin implements Plugin<Project> {
return "${configuration.root}/${configuration.name}:${configuration.tag}"
}
+ project.ext.containerImageTags = {
+ String[] tags
+ if (project.rootProject.hasProperty(["docker-tag-list"])) {
+ tags = project.rootProject["docker-tag-list"].split(',')
+ } else {
+ tags = [
+ project.rootProject.hasProperty(["docker-tag"]) ?
+ project.rootProject["docker-tag"] : project.sdk_version,
Review comment:
I'm not a huge fan of adding this default vs using `tags =
[project.rootProject["docker-tag"]]` and having a caller provide
`docker-tag-list=${sdk_version},latest`. Is this specific to work you are
planning?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]