From b5c2a59f4b2ea0475ee8e52a0973aeebdf65f08b Mon Sep 17 00:00:00 2001 From: Corneil du Plessis Date: Fri, 8 Nov 2024 16:34:58 +0200 Subject: [PATCH] Update setup-java and setup-jfrog to v4 Changes to setup-java@v4 requires distribution. Specify specific version of Java [skip ci] (cherry picked from commit 89797e71b382e2485c670d1f22530146034912e5) --- .github/workflows/ci-2021-1-x.yml | 1 + .github/workflows/ci-it.yml | 12 ++++++------ .github/workflows/ci-manual.yml | 1 + .github/workflows/common.yml | 30 +++++++++++++++--------------- .github/workflows/descriptor.yml | 12 ++---------- configure-jfrog.sh | 2 ++ 6 files changed, 27 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci-2021-1-x.yml b/.github/workflows/ci-2021-1-x.yml index 434d711d..dd39b07c 100644 --- a/.github/workflows/ci-2021-1-x.yml +++ b/.github/workflows/ci-2021-1-x.yml @@ -22,6 +22,7 @@ jobs: GCP_CRED_JSON: ${{ secrets.GCP_CRED_JSON }} ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} + JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} with: branch: '2021.1.x' verbose: ${{ inputs.verbose == 'true' }} diff --git a/.github/workflows/ci-it.yml b/.github/workflows/ci-it.yml index 090744d8..2e52874a 100644 --- a/.github/workflows/ci-it.yml +++ b/.github/workflows/ci-it.yml @@ -38,16 +38,16 @@ jobs: - name: 'Configure: Install Java' if: ${{ env.JAVA_VERSION == '8' }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 8 + java-version: ${{ env.JAVA_VERSION }} + distribution: 'liberica' - name: 'Configure: Install GraalVM' if: ${{ env.JAVA_VERSION != '8' }} - uses: graalvm/setup-graalvm@v1 + uses: actions/setup-java@v4 with: - version: 'latest' - java-version: '17' - github-token: ${{ secrets.GITHUB_TOKEN }} + java-version: ${{ env.JAVA_VERSION }} + distribution: 'graalvm' - name: 'Configure: cache for maven dependencies' uses: actions/cache@v3 with: diff --git a/.github/workflows/ci-manual.yml b/.github/workflows/ci-manual.yml index 78df924f..aca7ab4f 100644 --- a/.github/workflows/ci-manual.yml +++ b/.github/workflows/ci-manual.yml @@ -25,6 +25,7 @@ jobs: GCP_CRED_JSON: ${{ secrets.GCP_CRED_JSON }} ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} + JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} with: branch: ${{ inputs.branch }} verbose: ${{ inputs.verbose == 'true' }} diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index e656701e..1b2ed9d1 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -177,16 +177,16 @@ jobs: run: find . -type f -name "*.sh" -exec chmod a+x '{}' \; - name: 'Configure: Install Java' if: ${{ needs.parameters.outputs.jdk_build == '8' }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: ${{ needs.parameters.outputs.jdk_build }} + distribution: 'liberica' - name: 'Configure: Install GraalVM' if: ${{ needs.parameters.outputs.jdk_build != '8' }} - uses: graalvm/setup-graalvm@v1 + uses: actions/setup-java@v4 with: - version: 'latest' java-version: ${{ needs.parameters.outputs.jdk_build }} - components: 'js' + distribution: 'graalvm' github-token: ${{ secrets.GITHUB_TOKEN }} - name: 'Configure: cache for maven dependencies' uses: actions/cache@v3 @@ -321,16 +321,16 @@ jobs: run: find . -type f -name "*.sh" -exec chmod a+x '{}' \; - name: 'Configure: Install Java' if: ${{ needs.parameters.outputs.jdk_build == '8' }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: ${{ needs.parameters.outputs.jdk_build }} + distribution: 'liberica' - name: 'Configure: Install GraalVM' if: ${{ needs.parameters.outputs.jdk_build != '8' }} - uses: graalvm/setup-graalvm@v1 + uses: actions/setup-java@v4 with: - version: 'latest' java-version: ${{ needs.parameters.outputs.jdk_build }} - components: 'js' + distribution: 'graalvm' github-token: ${{ secrets.GITHUB_TOKEN }} - name: 'Configure: cache for maven dependencies' uses: actions/cache@v3 @@ -461,17 +461,16 @@ jobs: run: find . -type f -name "*.sh" -exec chmod a+x '{}' \; - name: 'Configure: Install Java' if: ${{ needs.parameters.outputs.jdk_build == '8' }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: ${{ needs.parameters.outputs.jdk_build }} + distribution: 'liberica' - name: 'Configure: Install GraalVM' if: ${{ needs.parameters.outputs.jdk_build != '8' }} - uses: graalvm/setup-graalvm@v1 + uses: actions/setup-java@v4 with: - version: 'latest' java-version: ${{ needs.parameters.outputs.jdk_build }} - components: 'js' - github-token: ${{ secrets.GITHUB_TOKEN }} + distribution: 'graalvm' - name: 'Configure: cache for maven dependencies' uses: actions/cache@v3 with: @@ -762,13 +761,14 @@ jobs: echo "::info ::$MESSAGE" fi popd > /dev/null - - uses: jfrog/setup-jfrog-cli@v3 + - uses: jfrog/setup-jfrog-cli@v4 env: JF_URL: 'https://repo.spring.io' - JF_ENV_1: ${{ secrets.JF_ARTIFACTORY_SPRING }} + JF_ACCESS_TOKEN: ${{ secrets.JF_ARTIFACTORY_SPRING }} - name: Configure JFrog Cli shell: bash run: | + jfrog rt ping ./configure-jfrog.sh ${{ needs.parameters.outputs.build_version_type }} echo JFROG_CLI_BUILD_NAME=stream-apps-main-release >> $GITHUB_ENV echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV diff --git a/.github/workflows/descriptor.yml b/.github/workflows/descriptor.yml index 0dae66e5..da466fa1 100644 --- a/.github/workflows/descriptor.yml +++ b/.github/workflows/descriptor.yml @@ -128,18 +128,10 @@ jobs: shell: bash run: find . -type f -name "*.sh" -exec chmod a+x '{}' \; - name: 'Configure: Install Java' - if: ${{ needs.parameters.outputs.jdk_build == '8' }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: ${{ needs.parameters.outputs.jdk_build }} - - name: 'Configure: Install GraalVM' - if: ${{ needs.parameters.outputs.jdk_build != '8' }} - uses: graalvm/setup-graalvm@v1 - with: - version: 'latest' - java-version: ${{ needs.parameters.outputs.jdk_build }} - components: 'js' - github-token: ${{ secrets.GITHUB_TOKEN }} + distribution: 'liberica' - name: 'Configure: cache for maven dependencies' uses: actions/cache@v3 with: diff --git a/configure-jfrog.sh b/configure-jfrog.sh index 6f8851e5..3ddf16f5 100755 --- a/configure-jfrog.sh +++ b/configure-jfrog.sh @@ -17,3 +17,5 @@ case $1 in esac echo "MVNC=$MVNC" jfrog mvnc $MVNC +RC=$? +exit $RC \ No newline at end of file