Skip to content

Commit 2f703ae

Browse files
authored
Update republish workflow to split docker pushes (#34086)
* Update republish workflow to split docker pushes * Split out python
1 parent 9c8a696 commit 2f703ae

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/republish_released_docker_containers.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,21 @@ jobs:
3939

4040
build:
4141
runs-on: ubuntu-22.04
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
# Split up images to publish so that longer ones are able to run independently/finish faster, otherwise this takes >6 hours
46+
# Any task which is skipped from a broader task must be explicitly included in this list to avoid accidentally missing new
47+
# tasks as they are added.
48+
images_to_publish: [
49+
{"gradle_task": ":pushAllRunnersDockerImages", "skip_flags": ""},
50+
{"gradle_task": ":sdks:python:container:push39", "skip_flags": ""},
51+
{"gradle_task": ":sdks:python:container:push310", "skip_flags": ""},
52+
{"gradle_task": ":sdks:python:container:push311", "skip_flags": ""},
53+
{"gradle_task": ":sdks:python:container:pushAll", "skip_flags": "-Pskip-python-39-images -Pskip-python-310-images -Pskip-python-311-images"},
54+
{"gradle_task": ":pushAllSdkDockerImages", "skip_flags": "-Pskip-python-images"},
55+
{"gradle_task": ":pushAllDockerImages", "skip_flags": "-Pskip-runner-images -Pskip-sdk-images"}
56+
]
4257
steps:
4358
- name: Checkout
4459
uses: actions/checkout@v4
@@ -73,10 +88,10 @@ jobs:
7388
gcloud auth configure-docker ${{ env.docker_registry }}
7489
- name: Push docker images
7590
run: |
76-
./gradlew :pushAllDockerImages \
91+
./gradlew ${{ matrix.images_to_publish.gradle_task }} \
7792
-PisRelease \
7893
-Pdocker-pull-licenses \
79-
-Pprune-images \
94+
-Pprune-images ${{ matrix.images_to_publish.skip_flags }} \
8095
-Pdocker-repository-root=gcr.io/apache-beam-testing/updated_released_container_images \
8196
-Pdocker-tag-list=${{ env.release }},${{ github.sha }},$(date +'%Y-%m-%d') \
8297
--no-daemon \

0 commit comments

Comments
 (0)