diff --git a/jenkins/opensearch/distribution-build.jenkinsfile b/jenkins/opensearch/distribution-build.jenkinsfile index b03f0a4fe4..27c84fc164 100644 --- a/jenkins/opensearch/distribution-build.jenkinsfile +++ b/jenkins/opensearch/distribution-build.jenkinsfile @@ -140,6 +140,32 @@ pipeline { } } } + stage('build-macos-x64-tar') { + agent { + node { + label 'Jenkins-Agent-MacOS12-X64-Mac1Metal-Multi-Host' + } + } + tools { + jdk dockerAgent.javaVersion + } + steps { + script { + def buildManifestObj = buildAssembleUpload( + componentName: "${COMPONENT_NAME}", + inputManifest: "manifests/${INPUT_MANIFEST}", + distribution: "tar" + ) + } + } + post { + always { + script { + postCleanup() + } + } + } + } stage('build-and-test-x64-tar') { agent { docker { @@ -582,4 +608,3 @@ pipeline { } } } - diff --git a/manifests/2.1.1/opensearch-2.1.1.yml b/manifests/2.1.1/opensearch-2.1.1.yml index 695222ff65..289a9e6531 100644 --- a/manifests/2.1.1/opensearch-2.1.1.yml +++ b/manifests/2.1.1/opensearch-2.1.1.yml @@ -20,12 +20,21 @@ components: checks: - gradle:publish - gradle:properties:version + platforms: + - darwin + - linux - name: job-scheduler repository: https://github.com/opensearch-project/job-scheduler.git ref: '2.1' checks: - gradle:properties:version - gradle:dependencies:opensearch.version + platforms: + - darwin + - linux - name: security repository: https://github.com/opensearch-project/security.git ref: '2.1' + platforms: + - darwin + - linux diff --git a/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile b/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile index c72b088cfa..c9e3d807db 100644 --- a/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile +++ b/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile @@ -10,6 +10,7 @@ pipeline { ) echo dockerAgent.image echo dockerAgent.args + echo dockerAgent.javaVersion } } } @@ -21,6 +22,7 @@ pipeline { ) echo dockerAgent.image echo dockerAgent.args + echo dockerAgent.javaVersion } } } @@ -32,6 +34,7 @@ pipeline { ) echo dockerAgent.image echo dockerAgent.args + echo dockerAgent.javaVersion } } } @@ -43,6 +46,7 @@ pipeline { ) echo dockerAgent.image echo dockerAgent.args + echo dockerAgent.javaVersion } } } diff --git a/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile.txt b/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile.txt index 80b3e205a8..350a2da1f8 100644 --- a/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile.txt +++ b/tests/jenkins/jobs/DetectDockerImage_Jenkinsfile.txt @@ -9,8 +9,10 @@ detectDockerAgent.readYaml({file=manifests/1.1.0/opensearch-1.1.0.yml}) InputManifest.asBoolean() detectDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:ci-runner-centos7-v1 (null)) + detectDockerAgent.echo(Using java version openjdk-17) DetectDockerImage_Jenkinsfile.echo(opensearchstaging/ci-runner:ci-runner-centos7-v1) DetectDockerImage_Jenkinsfile.echo(null) + DetectDockerImage_Jenkinsfile.echo(openjdk-17) DetectDockerImage_Jenkinsfile.stage(opensearch-1.2.0, groovy.lang.Closure) DetectDockerImage_Jenkinsfile.script(groovy.lang.Closure) DetectDockerImage_Jenkinsfile.detectDockerAgent({manifest=manifests/1.2.0/opensearch-1.2.0.yml}) @@ -19,8 +21,10 @@ detectDockerAgent.readYaml({file=manifests/1.2.0/opensearch-1.2.0.yml}) InputManifest.asBoolean() detectDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028 (-e JAVA_HOME=/usr/lib/jvm/adoptopenjdk-14-hotspot)) + detectDockerAgent.echo(Using java version openjdk-14) DetectDockerImage_Jenkinsfile.echo(opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028) DetectDockerImage_Jenkinsfile.echo(-e JAVA_HOME=/usr/lib/jvm/adoptopenjdk-14-hotspot) + DetectDockerImage_Jenkinsfile.echo(openjdk-14) DetectDockerImage_Jenkinsfile.stage(opensearch-dashboards-1.1.0, groovy.lang.Closure) DetectDockerImage_Jenkinsfile.script(groovy.lang.Closure) DetectDockerImage_Jenkinsfile.detectDockerAgent({manifest=manifests/1.1.0/opensearch-dashboards-1.1.0.yml}) @@ -29,8 +33,10 @@ detectDockerAgent.readYaml({file=manifests/1.1.0/opensearch-dashboards-1.1.0.yml}) InputManifest.asBoolean() detectDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028 (null)) + detectDockerAgent.echo(Using java version openjdk-17) DetectDockerImage_Jenkinsfile.echo(opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028) DetectDockerImage_Jenkinsfile.echo(null) + DetectDockerImage_Jenkinsfile.echo(openjdk-17) DetectDockerImage_Jenkinsfile.stage(opensearch-dashboards-1.2.0, groovy.lang.Closure) DetectDockerImage_Jenkinsfile.script(groovy.lang.Closure) DetectDockerImage_Jenkinsfile.detectDockerAgent({manifest=manifests/1.2.0/opensearch-dashboards-1.2.0.yml}) @@ -39,5 +45,7 @@ detectDockerAgent.readYaml({file=manifests/1.2.0/opensearch-dashboards-1.2.0.yml}) InputManifest.asBoolean() detectDockerAgent.echo(Using Docker image opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028 (null)) + detectDockerAgent.echo(Using java version openjdk-17) DetectDockerImage_Jenkinsfile.echo(opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211028) DetectDockerImage_Jenkinsfile.echo(null) + DetectDockerImage_Jenkinsfile.echo(openjdk-17) diff --git a/vars/detectDockerAgent.groovy b/vars/detectDockerAgent.groovy index 9a7538beba..d378c08939 100644 --- a/vars/detectDockerAgent.groovy +++ b/vars/detectDockerAgent.groovy @@ -4,9 +4,18 @@ Map call(Map args = [:]) { def inputManifest = lib.jenkins.InputManifest.new(readYaml(file: manifest)) dockerImage = inputManifest.ci?.image?.name ?: 'opensearchstaging/ci-runner:ci-runner-centos7-v1' dockerArgs = inputManifest.ci?.image?.args + // Using default javaVersion as openjdk-17 + String javaVersion = 'openjdk-17' + java.util.regex.Matcher jdkMatch = (dockerArgs =~ /openjdk-\d+/) + if (jdkMatch.find()) { + def jdkMatchLine = jdkMatch[0] + javaVersion = jdkMatchLine + } echo "Using Docker image ${dockerImage} (${dockerArgs})" + echo "Using java version ${javaVersion}" return [ image: dockerImage, - args: dockerArgs + args: dockerArgs, + javaVersion: javaVersion ] }