diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c089ef9fab2..84aebbe3e97 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,10 +54,10 @@ variables: MAVEN_REPOSITORY_PROXY: "https://depot-read-api-java.us1.ddbuild.io/magicmirror/magicmirror/@current/" GRADLE_PLUGIN_PROXY: "https://depot-read-api-java.us1.ddbuild.io/magicmirror/magicmirror/@current/" BUILDER_IMAGE_REPO: "registry.ddbuild.io/images/mirror/dd-trace-java-docker-build" # images are pinned in images/mirror.lock.yaml in the DataDog/images repo - BUILDER_IMAGE_VERSION_PREFIX: "ci-" # use either an empty string (e.g. "") for latest images or a version followed by a hyphen (e.g. "ci-" or "123_merge-") + BUILDER_IMAGE_VERSION_PREFIX: "168_merge-" # use either an empty string (e.g. "") for latest images or a version followed by a hyphen (e.g. "ci-" or "123_merge-") TEST_COUNTS_S3_BUCKET: "dd-trace-java-ci-test-reports" REPO_NOTIFICATION_CHANNEL: "#apm-java-escalations" - DEFAULT_TEST_JVMS: /^(8|11|17|21|25|tip)$/ # the latest "tip" version is 26 + DEFAULT_TEST_JVMS: /^(8|11|17|21|25|27|tip)$/ # Java 27 TODO: remove 27 after GA (tip will move to 27) PROFILE_TESTS: description: "Enable profiling of tests" value: "false" @@ -100,6 +100,7 @@ workflow: - "17" - "21" - "25" + - "27" # Java 27 TODO: remove after GA (tip will move to 27) - "semeru11" - "oracle8" - "zulu8" @@ -742,7 +743,7 @@ muzzle-dep-report: needs: [] variables: <<: *tier_m_variables - DEFAULT_TEST_JVMS: /^(8|11|17|21|25|tip)$/ + DEFAULT_TEST_JVMS: /^(8|11|17|21|25|27|tip)$/ # Java 27 TODO: remove 27 after GA (tip will move to 27) GRADLE_PARAMS: "-PskipFlakyTests" TESTCONTAINERS_CHECKS_DISABLE: "true" TESTCONTAINERS_RYUK_DISABLED: "true" @@ -978,7 +979,7 @@ test_inst_latest: CACHE_TYPE: "latestdep" parallel: matrix: - - testJvm: ["8", "17", "21", "25"] # the latest "tip" version is LTS v25 + - testJvm: ["8", "17", "21", "25", "27"] # Java 27 TODO: remove 27 after GA (tip will move to 27) # Gitlab doesn't support "parallel" and "parallel:matrix" at the same time # This emulates "parallel" by including it in the matrix CI_SPLIT: [ "1/6", "2/6", "3/6", "4/6", "5/6", "6/6"] @@ -991,7 +992,7 @@ test_inst_latest_arm64: CACHE_TYPE: "latestdep" parallel: matrix: - - testJvm: ["8", "17", "21", "25"] # the latest "tip" version is LTS v25 + - testJvm: ["8", "17", "21", "25", "27"] # Java 27 TODO: remove 27 after GA (tip will move to 27) # Gitlab doesn't support "parallel" and "parallel:matrix" at the same time # This emulates "parallel" by including it in the matrix CI_SPLIT: [ "1/6", "2/6", "3/6", "4/6", "5/6", "6/6"] @@ -1061,7 +1062,7 @@ test_debugger: variables: GRADLE_TARGET: ":debuggerTest" CACHE_TYPE: "base" - DEFAULT_TEST_JVMS: /^(8|11|17|21|25|semeru8)$/ # the latest "tip" version is LTS v25 + DEFAULT_TEST_JVMS: /^(8|11|17|21|25|27|semeru8)$/ # Java 27 TODO: remove 27 after GA (tip will move to 27) parallel: matrix: *test_matrix # avoid running coverage for semeru8, semeru11, semeru17 and ibm8 as some tests are disabled and therefore cannot reach the diff --git a/.gitlab/upload_ciapp.sh b/.gitlab/upload_ciapp.sh index a4c36438796..0457af6a910 100755 --- a/.gitlab/upload_ciapp.sh +++ b/.gitlab/upload_ciapp.sh @@ -16,6 +16,10 @@ if [ -n "$TEST_JVM" ]; then for var in $(compgen -v JAVA_ | grep -E '^JAVA_[0-9]+_HOME$'); do ver="${var#JAVA_}" ver="${ver%_HOME}" + # Java 27 TODO: remove after GA (tip will move to 27) + if [ "$ver" = "27" ]; then + continue + fi if [ "$ver" -gt "$MAX_VER" ] 2>/dev/null; then MAX_VER="$ver" fi diff --git a/buildSrc/src/main/kotlin/datadog/gradle/plugin/testJvmConstraints/TestJvmSpec.kt b/buildSrc/src/main/kotlin/datadog/gradle/plugin/testJvmConstraints/TestJvmSpec.kt index 16fd16977d8..89ff8650141 100644 --- a/buildSrc/src/main/kotlin/datadog/gradle/plugin/testJvmConstraints/TestJvmSpec.kt +++ b/buildSrc/src/main/kotlin/datadog/gradle/plugin/testJvmConstraints/TestJvmSpec.kt @@ -37,6 +37,16 @@ import java.nio.file.Paths class TestJvmSpec(val project: Project) { companion object { const val TEST_JVM = "testJvm" + + // Java 27 TODO: remove after GA (tip will move to 27) + internal fun resolveTipJavaVersion(javaVersions: List): String { + val tipJavaVersions = javaVersions.filterNot { it == 27 } + if (tipJavaVersions.isEmpty()) { + throw GradleException("No Java installations found for tip after excluding Java 27.") + } + + return tipJavaVersions.max().toString() + } } private val currentJavaHomePath = project.providers.systemProperty("java.home").map { it.normalizeToJDKJavaHome() } @@ -63,7 +73,7 @@ class TestJvmSpec(val project: Project) { throw GradleException("No Java installations found via toolchains or JAVA_X_HOME environment variables.") } - javaVersions.max().toString() + resolveTipJavaVersion(javaVersions) // Java 27 TODO: revert back to "javaVersions.max().toString()" after GA } else -> testJvm