Skip to content

Commit

Permalink
Publish Docker artifacts from build_release_candidate.yml (apache#26950)
Browse files Browse the repository at this point in the history
* Update build_release_candidate.yml

* rm maven settings

* Install python

* Run docker prune after each big push

* Add note to remove the settings.xml workaround if we move to self-hosted

* Make best effort
  • Loading branch information
damccorm authored and cushon committed May 24, 2024
1 parent 3bfdefc commit 0646991
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build_release_candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ on:
description: Whether to stage the java source into https://dist.apache.org/repos/dist/dev/beam/
required: true
default: 'no'
STAGE_DOCKER_ARTIFACTS:
description: Whether to stage SDK docker images to docker hub Apache organization
required: true
default: 'no'

jobs:
publish_java_artifacts:
Expand Down Expand Up @@ -130,3 +134,44 @@ jobs:
svn add --force .
svn status
svn commit -m "Staging Java artifacts for Apache Beam ${{ github.event.inputs.RELEASE }} RC${{ github.event.inputs.RC }}" --non-interactive --username ${{ github.event.inputs.APACHE_ID }} --password ${{ github.event.inputs.APACHE_PASSWORD }}
stage_docker:
if: ${{github.event.inputs.STAGE_DOCKER_ARTIFACTS == 'yes'}}
# Note: if this ever changes to self-hosted, remove the "Remove default github maven configuration" step
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: "v${{ github.event.inputs.RELEASE }}-RC${{ github.event.inputs.RC }}"
repository: apache/beam
- name: Install Java 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Install Python 3.8
uses: actions/setup-python@v3
with:
python-version: '3.8'
- run: echo $JAVA_HOME
- run: echo "JAVA11_HOME=${JAVA_HOME}" >> "$GITHUB_OUTPUT"
id: export-java11
- name: Install Java 8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
- name: Remove default github maven configuration
# This step is a workaround to avoid a decryption issue of Beam's
# net.linguica.gradle.maven.settings plugin and github's provided maven
# settings.xml file
run: rm ~/.m2/settings.xml || true
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push docker images
run: ./gradlew :pushAllDockerImages -PisRelease -Pdocker-pull-licenses -Pprune-images -Pdocker-tag=${{ github.event.inputs.RELEASE }}rc${{ github.event.inputs.RC }} -Pjava11Home=${{steps.export-java11.outputs.JAVA11_HOME}} --no-daemon --no-parallel

0 comments on commit 0646991

Please sign in to comment.