Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new darwin build stage to OpenSearch distribution pipeline #2362

Merged
merged 13 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion jenkins/opensearch/distribution-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,32 @@ pipeline {
}
}
}
stage('build-macos-x64-tar') {
agent {
node {
label 'Jenkins-Agent-MacOS12-X64-Mac1Metal-Multi-Host'
}
}
tools {
jdk dockerAgent.javaVersion
}
gaiksaya marked this conversation as resolved.
Show resolved Hide resolved
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 {
Expand Down Expand Up @@ -582,4 +608,3 @@ pipeline {
}
}
}

9 changes: 9 additions & 0 deletions manifests/2.1.1/opensearch-2.1.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions tests/jenkins/jobs/DetectDockerImage_Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pipeline {
)
echo dockerAgent.image
echo dockerAgent.args
echo dockerAgent.javaVersion
}
}
}
Expand All @@ -21,6 +22,7 @@ pipeline {
)
echo dockerAgent.image
echo dockerAgent.args
echo dockerAgent.javaVersion
}
}
}
Expand All @@ -32,6 +34,7 @@ pipeline {
)
echo dockerAgent.image
echo dockerAgent.args
echo dockerAgent.javaVersion
}
}
}
Expand All @@ -43,6 +46,7 @@ pipeline {
)
echo dockerAgent.image
echo dockerAgent.args
echo dockerAgent.javaVersion
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions tests/jenkins/jobs/DetectDockerImage_Jenkinsfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand All @@ -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})
Expand All @@ -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})
Expand All @@ -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)
11 changes: 10 additions & 1 deletion vars/detectDockerAgent.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
prudhvigodithi marked this conversation as resolved.
Show resolved Hide resolved
echo "Using Docker image ${dockerImage} (${dockerArgs})"
echo "Using java version ${javaVersion}"
return [
image: dockerImage,
args: dockerArgs
args: dockerArgs,
javaVersion: javaVersion
]
}