diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index a598da2c..2c573f7a 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -11,6 +11,10 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + + env: # actions/checkout uses node 16 + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + steps: - name: GitHub App token id: github_app_token @@ -22,7 +26,7 @@ jobs: - name: Get tag id: tag uses: dawidd6/action-get-tag@v1 - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ncipollo/release-action@v1 with: github_token: ${{ steps.github_app_token.outputs.token }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5a5ee4eb..e49961ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,11 +15,10 @@ jobs: product: opensearch linux-build: - needs: Get-CI-Image-Tag strategy: matrix: - java: - - 21 + java: [ 21 ] + needs: Get-CI-Image-Tag # Job name name: Linux - Build Asynchronous Search # This job runs on Linux. @@ -33,18 +32,23 @@ jobs: # need to switch to root so that github actions can install runner binary on container without permission issues. options: --user root + # actions/checkout@v4 and actions/setup-java@v4 use node 20: + # https://github.com/actions/checkout/releases/tag/v4.0.0 + # container image does not have GLIBC_2.28 required for this node version + # as such use @v3 actions instead for this workflow and set ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION env: ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true steps: # This step uses the setup-java Github action: https://github.com/actions/setup-java - - name: Set Up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + - name: Set up JDK ${{ matrix.java }} for build and test + uses: actions/setup-java@v3 with: + distribution: temurin # Temurin is a distribution of adoptium java-version: ${{ matrix.java }} # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build with Gradle id: step-build-test-linux run: | @@ -65,18 +69,21 @@ jobs: if-no-files-found: error linux-test-docker: - needs: linux-build strategy: matrix: - java: - - 21 + java: [ 21 ] + needs: linux-build # Job name name: Test Asynchronous Search with opensearchstaging docker # This job runs on Linux. runs-on: ubuntu-latest + + env: # actions/checkout uses node 16 + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + steps: - name: Checkout Branch - uses: actions/checkout@v2 + uses: actions/checkout@v3 - uses: actions/download-artifact@v3 with: name: async-plugin-linux-${{ matrix.java }} @@ -138,19 +145,24 @@ jobs: path: build/testclusters/integTest-*/logs/* windows-build: + strategy: + matrix: + java: [ 21 ] # Job name name: Windows - Build Asynchronous Search # This job runs on Windows. runs-on: windows-latest + steps: # This step uses the setup-java Github action: https://github.com/actions/setup-java - - name: Set Up JDK 21 - uses: actions/setup-java@v1 + - name: Set Up JDK ${{ matrix.java }} + uses: actions/setup-java@v3 with: - java-version: 21 + distribution: temurin # Temurin is a distribution of adoptium + java-version: ${{ matrix.java }} # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build with Gradle run: ./gradlew.bat build -x integTest -x jacocoTestReport env: @@ -167,19 +179,24 @@ jobs: path: asynchronous-search-artifacts mac-os-build: + strategy: + matrix: + java: [ 21 ] # Job name name: MacOS - Build Asynchronous Search # This job runs on Mac OS. runs-on: macos-latest + steps: # This step uses the setup-java Github action: https://github.com/actions/setup-java - - name: Set Up JDK 21 - uses: actions/setup-java@v1 + - name: Set Up JDK ${{ matrix.java }} + uses: actions/setup-java@v3 with: - java-version: 21 + distribution: temurin # Temurin is a distribution of adoptium + java-version: ${{ matrix.java }} # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build with Gradle run: ./gradlew build -x integTest -x jacocoTestReport env: diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 3e924caf..201cdae1 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -9,6 +9,10 @@ on: jobs: build-and-publish-snapshots: + strategy: + matrix: + java: [ 11,17,21 ] + runs-on: ubuntu-latest permissions: @@ -16,11 +20,12 @@ jobs: contents: write steps: - - uses: actions/setup-java@v3 + - name: Set Up JDK ${{ matrix.java }} + uses: actions/setup-java@v4 with: distribution: temurin # Temurin is a distribution of adoptium - java-version: 11 - - uses: actions/checkout@v3 + java-version: ${{ matrix.java }} + - uses: actions/checkout@v4 - uses: aws-actions/configure-aws-credentials@v1 with: role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }} diff --git a/.github/workflows/multi-node-test-workflow.yml b/.github/workflows/multi-node-test-workflow.yml index 086e4138..cbfdf430 100644 --- a/.github/workflows/multi-node-test-workflow.yml +++ b/.github/workflows/multi-node-test-workflow.yml @@ -1,7 +1,5 @@ name: Multi node test workflow -env: - java_version: 21 # This workflow is triggered on pull requests to master on: pull_request: @@ -18,6 +16,9 @@ jobs: product: opensearch build: + strategy: + matrix: + java: [ 21 ] # Job name needs: Get-CI-Image-Tag name: Build Asynchronous Search @@ -30,18 +31,24 @@ jobs: # need to switch to root so that github actions can install runner binary on container without permission issues. options: --user root + # actions/checkout@v4 and actions/setup-java@v4 use node 20: + # https://github.com/actions/checkout/releases/tag/v4.0.0 + # container image does not have GLIBC_2.28 required for this node version + # as such use @v3 actions instead for this workflow and set ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION env: ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true steps: # This step uses the setup-java Github action: https://github.com/actions/setup-java - - name: Set Up JDK 21 - uses: actions/setup-java@v1 + - name: Set Up JDK ${{ matrix.java }} + uses: actions/setup-java@v3 with: - java-version: ${{ env.java_version }} + distribution: temurin # Temurin is a distribution of adoptium + java-version: ${{ matrix.java }} + # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run integration tests with multi node config run: | chown -R 1000:1000 `pwd` diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index e96fb5e4..aa6d8b71 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -13,19 +13,21 @@ jobs: build: strategy: matrix: - java: [11,17,21] + java: [21] # Job name name: Build Asynchronous Search with JDK ${{ matrix.java }} # This job runs on Linux runs-on: ubuntu-latest + steps: # 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: Set Up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: temurin # Temurin is a distribution of adoptium java-version: ${{ matrix.java }} # Building zip, deb and rpm files