Abacn commented on code in PR #26967:
URL: https://github.com/apache/beam/pull/26967#discussion_r1247179539
##########
sdks/python/container/build.gradle:
##########
@@ -42,11 +42,75 @@ tasks.register("buildAll") {
dependsOn ':sdks:python:container:py311:docker'
}
-tasks.register("pushAll") {
+tasks.register("push38") {
dependsOn ':sdks:python:container:py38:dockerPush'
+
+ doLast {
+ if (project.hasProperty("prune-images")) {
+ exec {
+ executable("docker")
+ args("system", "prune", "-a", "--force")
+ }
+ }
+ }
+}
+
+tasks.register("push39") {
+ // Enforce ordering to allow the prune step to happen between runs.
Review Comment:
this is a great idea. Can we consolidate this part in a loop like
```
for(i=0; i<versions.length; ++i) {
taskName = "push" +versions[i]
tasks.register(taskName) {
if (i>0) {
mustRunAfter(":sdks:python:container:push"+versions[i-1])
}
...
}
}
```
this would make new version support / drop old version easier
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]