You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2023/08/16 18:04:45 UTC
[beam] 01/01: Add back docker prune step between python container pushes
This is an automated email from the ASF dual-hosted git repository.
damccorm pushed a commit to branch users/damccorm/addBackOrdering
in repository https://gitbox.apache.org/repos/asf/beam.git
commit 3d8ec80173fb3ca09b2609ecd2b136aaf646736c
Author: Danny McCormick <da...@google.com>
AuthorDate: Wed Aug 16 14:04:37 2023 -0400
Add back docker prune step between python container pushes
---
sdks/python/container/build.gradle | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/sdks/python/container/build.gradle b/sdks/python/container/build.gradle
index fec9bc98c33..834aacd6cf6 100644
--- a/sdks/python/container/build.gradle
+++ b/sdks/python/container/build.gradle
@@ -42,8 +42,33 @@ tasks.register("buildAll") {
dependsOn ':sdks:python:container:py311:docker'
}
+for(int i=8; i<=11; ++i) {
+ String cur = "3" + i
+ String prev = "3" + (i-1)
+ tasks.register("push" + cur) {
+ if (cur != "38") {
+ // Enforce ordering to allow the prune step to happen between runs.
+ // This will ensure we don't use up too much space (especially in CI environments)
+ mustRunAfter(":sdks:python:container:push" + prev)
+ }
+ dependsOn ':sdks:python:container:py' + cur + ':docker'
+
+ doLast {
+ if (project.hasProperty("prune-images")) {
+ exec {
+ executable("docker")
+ args("system", "prune", "-a", "--force")
+ }
+ }
+ }
+ }
+}
+
tasks.register("pushAll") {
- dependsOn ':sdks:python:container:buildAll'
+ dependsOn ':sdks:python:container:push38'
+ dependsOn ':sdks:python:container:push39'
+ dependsOn ':sdks:python:container:push310'
+ dependsOn ':sdks:python:container:push311'
}
tasks.register("generatePythonRequirementsAll") {