From b6c9f585ffc9d7650eff74652fc02cd0c5bb6556 Mon Sep 17 00:00:00 2001 From: zane-neo Date: Fri, 21 Jun 2024 16:26:27 +0800 Subject: [PATCH] upgrade jdk baseline to 21 (#336) * upgrade jdk baseline to 21 Signed-off-by: zane-neo * fix labeler issue Signed-off-by: zane-neo --------- Signed-off-by: zane-neo --- .github/labeler.yml | 24 ++++++++++++------------ .github/workflows/ci.yml | 6 +++--- .github/workflows/test_security.yml | 4 ++-- build.gradle | 7 ++++--- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 9f6f50c5..2dbf7127 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,15 +1,15 @@ -backport 2.x: - - "*" - - "*/*" - - "*/**/*" - - "*/**/**/*" - - "*/**/**/**/*" - - "*/**/**/**/**/*" - - "*/**/**/**/**/**/*" - - "*/**/**/**/**/**/**/*" - - "*/**/**/**/**/**/**/**/*" - - "*/**/**/**/**/**/**/**/**/*" - - ".github/**/*" +#backport 2.x: +# - "*" +# - "*/*" +# - "*/**/*" +# - "*/**/**/*" +# - "*/**/**/**/*" +# - "*/**/**/**/**/*" +# - "*/**/**/**/**/**/*" +# - "*/**/**/**/**/**/**/*" +# - "*/**/**/**/**/**/**/**/*" +# - "*/**/**/**/**/**/**/**/**/*" +# - ".github/**/*" infra: - ".github/**/*" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19a958ef..15862709 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: needs: Get-CI-Image-Tag strategy: matrix: - java: [11, 17, 21] + java: [21] name: Build and Test skills plugin on Linux runs-on: ubuntu-latest container: @@ -69,7 +69,7 @@ jobs: build-MacOS: strategy: matrix: - java: [11, 17, 21] + java: [21] name: Build and Test skills Plugin on MacOS needs: Get-CI-Image-Tag @@ -94,7 +94,7 @@ jobs: build-windows: strategy: matrix: - java: [11, 17, 21] + java: [21] name: Build and Test skills plugin on Windows needs: Get-CI-Image-Tag runs-on: windows-latest diff --git a/.github/workflows/test_security.yml b/.github/workflows/test_security.yml index 2509d678..7dff0c80 100644 --- a/.github/workflows/test_security.yml +++ b/.github/workflows/test_security.yml @@ -16,7 +16,7 @@ jobs: integ-test-with-security-linux: strategy: matrix: - java: [11, 17, 21] + java: [21] name: Run Security Integration Tests on Linux runs-on: ubuntu-latest @@ -40,4 +40,4 @@ jobs: # switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip. run: | chown -R 1000:1000 `pwd` - su `id -un 1000` -c "whoami && java -version && ./gradlew integTest -Dsecurity.enabled=true" \ No newline at end of file + su `id -un 1000` -c "whoami && java -version && ./gradlew integTest -Dsecurity.enabled=true" diff --git a/build.gradle b/build.gradle index 7fdf4b1c..00e68f86 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,6 @@ import org.opensearch.gradle.test.RestIntegTestTask import java.util.concurrent.Callable -import org.opensearch.gradle.testclusters.OpenSearchCluster import java.nio.file.Paths import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin @@ -65,8 +64,10 @@ allprojects { version = "${opensearch_build}" } -targetCompatibility = JavaVersion.VERSION_11 -sourceCompatibility = JavaVersion.VERSION_11 +java { + targetCompatibility = JavaVersion.VERSION_21 + sourceCompatibility = JavaVersion.VERSION_21 +} apply plugin: 'java' apply plugin: 'jacoco'