From a74c57f9aaec4904f3970f60e3300935f501c166 Mon Sep 17 00:00:00 2001 From: Zixuan Liu Date: Mon, 11 Mar 2024 12:36:04 +0800 Subject: [PATCH] [improve][ci] Switch JDK distribution from temurin to corretto --- .github/workflows/ci-maven-cache-update.yaml | 3 +- .../workflows/ci-owasp-dependency-check.yaml | 3 +- .github/workflows/codeql.yaml | 5 +++- .github/workflows/pulsar-ci-flaky.yaml | 3 +- .github/workflows/pulsar-ci.yaml | 29 ++++++++++--------- 5 files changed, 25 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci-maven-cache-update.yaml b/.github/workflows/ci-maven-cache-update.yaml index 2488306a25172..53dff03c248cc 100644 --- a/.github/workflows/ci-maven-cache-update.yaml +++ b/.github/workflows/ci-maven-cache-update.yaml @@ -43,6 +43,7 @@ on: env: MAVEN_OPTS: -Xss1500k -Xmx1024m -Daether.connector.http.reuseConnections=false -Daether.connector.requestTimeout=60000 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true -Dmaven.wagon.http.serviceUnavailableRetryStrategy.class=standard -Dmaven.wagon.rto=60000 + JDK_DISTRIBUTION: corretto jobs: update-maven-dependencies-cache: @@ -106,7 +107,7 @@ jobs: uses: actions/setup-java@v4 if: ${{ (github.event_name == 'schedule' || steps.changes.outputs.poms == 'true') && steps.cache.outputs.cache-hit != 'true' }} with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: 17 - name: Download dependencies diff --git a/.github/workflows/ci-owasp-dependency-check.yaml b/.github/workflows/ci-owasp-dependency-check.yaml index a59d3e9d3686a..a273e902c88d2 100644 --- a/.github/workflows/ci-owasp-dependency-check.yaml +++ b/.github/workflows/ci-owasp-dependency-check.yaml @@ -25,6 +25,7 @@ on: env: MAVEN_OPTS: -Xss1500k -Xmx1024m -Daether.connector.http.reuseConnections=false -Daether.connector.requestTimeout=60000 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true -Dmaven.wagon.http.serviceUnavailableRetryStrategy.class=standard -Dmaven.wagon.rto=60000 + JDK_DISTRIBUTION: corretto jobs: run-owasp-dependency-check: @@ -74,7 +75,7 @@ jobs: - name: Set up JDK ${{ matrix.jdk || '17' }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ matrix.jdk || '17' }} - name: run install by skip tests diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index 6c7e9acfbf116..16430d19f3de8 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -30,6 +30,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true +env: + JDK_DISTRIBUTION: corretto + jobs: analyze: # only run scheduled analysis in apache/pulsar repository @@ -63,7 +66,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: 17 - name: Checkout repository diff --git a/.github/workflows/pulsar-ci-flaky.yaml b/.github/workflows/pulsar-ci-flaky.yaml index c8e944fcfc6d9..a92e5cd26c35b 100644 --- a/.github/workflows/pulsar-ci-flaky.yaml +++ b/.github/workflows/pulsar-ci-flaky.yaml @@ -70,6 +70,7 @@ env: # it's possible to rerun individual failed jobs when the build artifacts are available # if the artifacts have already been expired, the complete workflow can be rerun by closing and reopening the PR or by rebasing the PR ARTIFACT_RETENTION_DAYS: 3 + JDK_DISTRIBUTION: corretto jobs: preconditions: @@ -189,7 +190,7 @@ jobs: - name: Set up JDK ${{ env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ env.CI_JDK_MAJOR_VERSION }} - name: Build core-modules diff --git a/.github/workflows/pulsar-ci.yaml b/.github/workflows/pulsar-ci.yaml index e2c7cb44e2e5e..db1c175bc6221 100644 --- a/.github/workflows/pulsar-ci.yaml +++ b/.github/workflows/pulsar-ci.yaml @@ -70,6 +70,7 @@ env: # it's possible to rerun individual failed jobs when the build artifacts are available # if the artifacts have already been expired, the complete workflow can be rerun by closing and reopening the PR or by rebasing the PR ARTIFACT_RETENTION_DAYS: 3 + JDK_DISTRIBUTION: corretto jobs: preconditions: @@ -180,7 +181,7 @@ jobs: - name: Set up JDK ${{ env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ env.CI_JDK_MAJOR_VERSION }} - name: Check source code license headers @@ -299,7 +300,7 @@ jobs: - name: Set up JDK ${{ matrix.jdk || env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ matrix.jdk || env.CI_JDK_MAJOR_VERSION }} - name: Install gh-actions-artifact-client.js @@ -415,7 +416,7 @@ jobs: - name: Set up JDK ${{ matrix.jdk || env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ matrix.jdk || env.CI_JDK_MAJOR_VERSION }} - name: Install gh-actions-artifact-client.js @@ -497,7 +498,7 @@ jobs: - name: Set up JDK ${{ env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ env.CI_JDK_MAJOR_VERSION }} - name: Install gh-actions-artifact-client.js @@ -618,7 +619,7 @@ jobs: - name: Set up JDK ${{ env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ env.CI_JDK_MAJOR_VERSION }} - name: Install gh-actions-artifact-client.js @@ -643,7 +644,7 @@ jobs: uses: actions/setup-java@v4 if: ${{ matrix.runtime_jdk }} with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ matrix.runtime_jdk }} - name: Run integration test group '${{ matrix.group }}' @@ -735,7 +736,7 @@ jobs: - name: Set up JDK ${{ env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ env.CI_JDK_MAJOR_VERSION }} - name: Install gh-actions-artifact-client.js @@ -852,7 +853,7 @@ jobs: - name: Set up JDK ${{ env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ env.CI_JDK_MAJOR_VERSION }} - name: Install gh-actions-artifact-client.js @@ -982,7 +983,7 @@ jobs: - name: Set up JDK ${{ env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ env.CI_JDK_MAJOR_VERSION }} - name: Install gh-actions-artifact-client.js @@ -1094,7 +1095,7 @@ jobs: - name: Set up JDK ${{ env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ env.CI_JDK_MAJOR_VERSION }} - name: Install gh-actions-artifact-client.js @@ -1197,7 +1198,7 @@ jobs: - name: Set up JDK ${{ env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ env.CI_JDK_MAJOR_VERSION }} - name: Install gh-actions-artifact-client.js @@ -1316,7 +1317,7 @@ jobs: - name: Set up JDK ${{ env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ env.CI_JDK_MAJOR_VERSION }} - name: build package @@ -1370,7 +1371,7 @@ jobs: - name: Set up JDK ${{ env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ env.CI_JDK_MAJOR_VERSION }} - name: Initialize CodeQL @@ -1427,7 +1428,7 @@ jobs: - name: Set up JDK ${{ matrix.jdk || env.CI_JDK_MAJOR_VERSION }} uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: ${{ env.JDK_DISTRIBUTION }} java-version: ${{ matrix.jdk || env.CI_JDK_MAJOR_VERSION }} - name: Clean Disk