From dcc0bd2fb226afe8919fe49499320a7ae5067d2a Mon Sep 17 00:00:00 2001 From: Yi Hu Date: Tue, 1 Oct 2024 11:31:51 -0400 Subject: [PATCH] Build release candidate with Java 11 (#32573) * Build release candidate with Java 11 * cleanup leftover flag --- .github/workflows/README.md | 4 ++-- .github/workflows/build_release_candidate.yml | 22 ++++++------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 0f3a42583c36..d386f4dc40f9 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -162,14 +162,14 @@ To work around this, you can start using hosted runners and then switch over whe You can do this by changing `runs-on: [self-hosted, ubuntu-20.04, main]` (self-hosted, use in your PR) to `runs-on: ubuntu-20.04` (GitHub hosted, use for local testing). Note when using `ubuntu-20.04` as the host, you might need to choose the Java version since some gradle tasks only work with a certain Java version. -One example is below to use Java 8 when testing your workflow: +One example is below to use Java 11 when testing your workflow: ``` steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: '8' + java-version: '11' ``` ## Testing Workflow Updates diff --git a/.github/workflows/build_release_candidate.yml b/.github/workflows/build_release_candidate.yml index d2bd863483fc..fdbae21336e5 100644 --- a/.github/workflows/build_release_candidate.yml +++ b/.github/workflows/build_release_candidate.yml @@ -62,11 +62,11 @@ jobs: with: ref: "v${{ github.event.inputs.RELEASE }}-RC${{ github.event.inputs.RC }}" repository: apache/beam - - name: Install Java 8 + - name: Install Java 11 uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '8' + java-version: '11' - name: Import GPG key id: import_gpg uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 @@ -114,11 +114,11 @@ jobs: then echo "Must provide an apache password to stage artifacts to https://dist.apache.org/repos/dist/dev/beam/" fi - - name: Install Java 8 + - name: Install Java 11 uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '8' + java-version: '11' - name: Import GPG key id: import_gpg uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 @@ -264,14 +264,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.9' - - run: echo $JAVA_HOME - - run: echo "JAVA11_HOME=${JAVA_HOME}" >> "$GITHUB_OUTPUT" - id: export-java11 - - name: Install Java 8 - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '8' - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Remove default github maven configuration @@ -285,7 +277,7 @@ jobs: username: ${{ secrets.DOCKERHUB_USER }} 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 + run: ./gradlew :pushAllDockerImages -PisRelease -Pdocker-pull-licenses -Pprune-images -Pdocker-tag=${{ github.event.inputs.RELEASE }}rc${{ github.event.inputs.RC }} --no-daemon --no-parallel beam_site_pr: if: ${{ fromJson(github.event.inputs.STAGE).beam_site_pr == 'yes'}} @@ -318,11 +310,11 @@ jobs: uses: actions/setup-node@v4 with: node-version: '16' - - name: Install Java 8 + - name: Install Java 11 uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '8' + java-version: '11' - 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