|
39 | 39 |
|
40 | 40 | build: |
41 | 41 | 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 | + ] |
42 | 57 | steps: |
43 | 58 | - name: Checkout |
44 | 59 | uses: actions/checkout@v4 |
@@ -73,10 +88,10 @@ jobs: |
73 | 88 | gcloud auth configure-docker ${{ env.docker_registry }} |
74 | 89 | - name: Push docker images |
75 | 90 | run: | |
76 | | - ./gradlew :pushAllDockerImages \ |
| 91 | + ./gradlew ${{ matrix.images_to_publish.gradle_task }} \ |
77 | 92 | -PisRelease \ |
78 | 93 | -Pdocker-pull-licenses \ |
79 | | - -Pprune-images \ |
| 94 | + -Pprune-images ${{ matrix.images_to_publish.skip_flags }} \ |
80 | 95 | -Pdocker-repository-root=gcr.io/apache-beam-testing/updated_released_container_images \ |
81 | 96 | -Pdocker-tag-list=${{ env.release }},${{ github.sha }},$(date +'%Y-%m-%d') \ |
82 | 97 | --no-daemon \ |
|
0 commit comments