From 0014e9bd5c3182a5f764c76b94320cb0b6a32ef4 Mon Sep 17 00:00:00 2001 From: Hiroyuki Yamada Date: Tue, 10 Sep 2024 16:32:39 +0900 Subject: [PATCH] Backport to branch(3.10) : [CI] Use official Oracle JDK image instead of in-house one (#2217) Co-authored-by: Vincent --- .github/workflows/ci.yaml | 407 +++++++++++++++++++------------------- 1 file changed, 198 insertions(+), 209 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e188d50d34..d31b5553c2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,9 +38,8 @@ env: ORG_GRADLE_PROJECT_javaVendor: 'temurin' ORG_GRADLE_PROJECT_integrationTestJavaRuntimeVersion: "${{ github.event_name != 'workflow_dispatch' && '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION }}" ORG_GRADLE_PROJECT_integrationTestJavaRuntimeVendor: "${{ github.event_name != 'workflow_dispatch' && 'temurin' || inputs.INT_TEST_JAVA_RUNTIME_VENDOR }}" - # This variable evaluates to: if {!(Temurin JDK 8) && !(Oracle JDK 8 or 11)} then {true} else {false} - SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11: "${{ (github.event_name == 'workflow_dispatch' && !(inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'temurin') && !(inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' && (inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11'))) && 'true' || 'false' }}" - SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11: "${{ (inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' && (inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11')) && 'true' || 'false' }}" + # This variable evaluates to: if {!(Temurin JDK 8) && !(Oracle JDK)} then {true} else {false} + SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK: "${{ (github.event_name == 'workflow_dispatch' && !(inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'temurin') && !(inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle')) && 'true' || 'false' }}" jobs: check: @@ -143,25 +142,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -200,25 +198,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -236,6 +233,10 @@ jobs: integration-test-for-cosmos: name: Cosmos DB integration test runs-on: windows-latest + env: + # This variable evaluates to: if {!(Temurin JDK 8) && !(Oracle JDK 8 or 11)} then {true} else {false} + SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11: "${{ (github.event_name == 'workflow_dispatch' && !(inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'temurin') && !(inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' && (inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11'))) && 'true' || 'false' }}" + SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11: "${{ (inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' && (inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11')) && 'true' || 'false' }}" steps: - uses: actions/checkout@v3 @@ -338,25 +339,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -394,25 +394,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -450,25 +449,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -506,25 +504,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -563,25 +560,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -620,25 +616,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -677,25 +672,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -734,26 +728,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -791,25 +783,24 @@ jobs: distribution: ${{ env.JAVA_VENDOR }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -854,25 +845,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -931,17 +921,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} + - name: Login to Oracle container registry + uses: docker/login-action@v3 + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} + with: + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} + - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -986,25 +983,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Create no superuser run: ./ci/no-superuser/create-no-superuser-sqlserver.sh sqlserver17 SqlServer17 10 3 @@ -1049,25 +1045,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Create no superuser run: ./ci/no-superuser/create-no-superuser-sqlserver.sh sqlserver19 SqlServer19 10 3 @@ -1112,25 +1107,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Create no superuser run: ./ci/no-superuser/create-no-superuser-sqlserver.sh sqlserver22 SqlServer22 10 3 @@ -1164,25 +1158,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Set up SQLite3 run: sudo apt-get install -y sqlite3 @@ -1223,25 +1216,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -1275,25 +1267,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -1338,25 +1329,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 @@ -1394,25 +1384,24 @@ jobs: - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test uses: actions/setup-java@v4 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}} + if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}} with: java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }} - - name: Login to GitHub Container Registry + - name: Login to Oracle container registry uses: docker/login-action@v3 - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} + registry: container-registry.oracle.com + username: ${{ secrets.OCR_USERNAME }} + password: ${{ secrets.OCR_TOKEN }} - name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test - if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}} + if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }} run: | - container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux") - docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id" - tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm + container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}") + docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id" - name: Setup Gradle uses: gradle/actions/setup-gradle@v4