diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10474e29..c684ef10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,9 +6,6 @@ on: pull_request: branches: - "*" -env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - jobs: Get-CI-Image-Tag: uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main @@ -19,7 +16,7 @@ jobs: needs: Get-CI-Image-Tag strategy: matrix: - java: [11, 17, 21] + java: [21] os: [ ubuntu-latest ] name: Build and Test query-insights plugin with JDK ${{ matrix.java }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -29,11 +26,22 @@ jobs: image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} # need to switch to root so that github actions can install runner binary on container without permission issues. options: --user root - + # see please https://github.com/actions/runner/issues/2906#issuecomment-2109514798 + volumes: + - /node20217:/node20217:rw,rshared + - /node20217:/__e/node20:ro,rshared steps: + - name: install nodejs20glibc2.17 + if: always() + run: | + yum install curl -yyq + curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz + tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 + ldd /__e/node20/bin/node + # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 # This step uses the setup-java Github action: https://github.com/actions/setup-java - name: Setup Java ${{ matrix.java }} @@ -77,7 +85,7 @@ jobs: WORKING_DIR: ${{ matrix.working_directory }}. strategy: matrix: - java: [11, 17] + java: [21] os: [ windows-latest, macos-latest ] include: - os: windows-latest diff --git a/.github/workflows/integ-tests-with-security.yml b/.github/workflows/integ-tests-with-security.yml index b978cf8f..69bc4b7c 100644 --- a/.github/workflows/integ-tests-with-security.yml +++ b/.github/workflows/integ-tests-with-security.yml @@ -21,8 +21,6 @@ jobs: fail-fast: false matrix: java: [ 21 ] - env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true runs-on: ubuntu-latest container: # using the same image which is used by opensearch-build team to build the OpenSearch Distribution @@ -30,9 +28,21 @@ jobs: image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} # need to switch to root so that github actions can install runner binary on container without permission issues. options: --user root + # see please https://github.com/actions/runner/issues/2906#issuecomment-2109514798 + volumes: + - /node20217:/node20217:rw,rshared + - /node20217:/__e/node20:ro,rshared steps: - - uses: actions/checkout@v3 + - name: install nodejs20glibc2.17 + if: always() + run: | + yum install curl -yyq + curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz + tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 + ldd /__e/node20/bin/node + + - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v3 diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 6c30bcf9..3bad8a55 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -18,11 +18,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 11 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: distribution: temurin # Temurin is a distribution of adoptium - java-version: 11 + java-version: 21 - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 diff --git a/build.gradle b/build.gradle index 454a75e4..80a86c71 100644 --- a/build.gradle +++ b/build.gradle @@ -59,6 +59,11 @@ configurations { zipArchive } +java { + targetCompatibility = JavaVersion.VERSION_21 + sourceCompatibility = JavaVersion.VERSION_21 +} + publishing { publications { pluginZip(MavenPublication) { publication ->