damccorm commented on code in PR #33484:
URL: https://github.com/apache/beam/pull/33484#discussion_r1901809077


##########
.github/workflows/beam_Publish_Python_SDK_Distroless_Snapshots.yml:
##########
@@ -85,8 +85,13 @@ jobs:
       - name: GCloud Docker credential helper
         run: |
           gcloud auth configure-docker ${{ env.docker_registry }}
-      # TODO(https://github.com/apache/beam/issues/32914): create after 
merging into main branch
-      # - name: Build and push Python distroless image
-
-
+      - name: Build and push Python distroless image
+        run: |
+          docker buildx build --push \
+            -t gcr.io/apache-beam-testing/beam-sdk/beam_${{ 
matrix.python_version }}_sdk_distroless:${{ github.sha }} \
+            -t gcr.io/apache-beam-testing/beam-sdk/beam_${{ 
matrix.python_version }}_sdk_distroless:${BEAM_VERSION} \
+            -t gcr.io/apache-beam-testing/beam-sdk/beam_${{ 
matrix.python_version }}_sdk_distroless:latest \
+            -f sdks/python/container/Dockerfile-distroless \
+            --build-arg=BASE=gcr.io/apache-beam-testing/beam-sdk/beam_${{ 
matrix.python_version }}_sdk:${BEAM_VERSION} \
+            .

Review Comment:
   Can this be encapsulated into a gradle task using the docker plugin? That 
has a few advantages:
   
   1) Consistency with our other docker build/pushes
   2) It can easily be incorporated into our other infra (e.g. 
https://github.com/apache/beam/blob/f4006fe48f21bcd884d4209bd8dabb022a8f0e09/build.gradle.kts#L637
 which is used by the release). Otherwise we'll need to have a special step in 
order to release these images
   3) It makes it easier to parameterize things (for example 
[here](https://github.com/apache/beam/blob/f4006fe48f21bcd884d4209bd8dabb022a8f0e09/.github/workflows/build_release_candidate.yml#L279)
 we are able to parameterize all of our release images with a single set of 
flags.



-- 
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]

Reply via email to