Skip to content

Commit

Permalink
Set query-insights plugin 3.0.0 baseline JDK version to JDK-21
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed Dec 2, 2024
1 parent b5e2d07 commit b55cc64
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 12 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/integ-tests-with-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,28 @@ 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
# this image tag is subject to change as more dependencies and updates will arrive over time
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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ configurations {
zipArchive
}

java {
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_21
}

publishing {
publications {
pluginZip(MavenPublication) { publication ->
Expand Down

0 comments on commit b55cc64

Please sign in to comment.