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:44 UTC

[beam] branch users/damccorm/addBackOrdering created (now 3d8ec80173f)

This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a change to branch users/damccorm/addBackOrdering
in repository https://gitbox.apache.org/repos/asf/beam.git


      at 3d8ec80173f Add back docker prune step between python container pushes

This branch includes the following new commits:

     new 3d8ec80173f Add back docker prune step between python container pushes

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[beam] 01/01: Add back docker prune step between python container pushes

Posted by da...@apache.org.
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") {