Skip to content

Commit

Permalink
Using jenv to set Java version on Jenkins Mac agent node (#4278)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Lu <[email protected]>
  • Loading branch information
jordarlu authored Dec 12, 2023
1 parent 00d5821 commit 9043e0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions jenkins/opensearch/publish-min-snapshots.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,10 @@ pipeline {
label AGENT_MACOS_X64
}
}
tools {
jdk dockerAgent.javaVersion
}
steps {
script {
echo("Switching to Java ${env.javaVersionNumber} on Mac Docker Container")
sh("jenv local ${dockerAgent.javaVersion}")
buildManifest(
componentName: "OpenSearch",
inputManifest: "manifests/${INPUT_MANIFEST}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@
publish-min-snapshots.stage(macos-x64-tar, groovy.lang.Closure)
publish-min-snapshots.echo(Executing on agent [label:Jenkins-Agent-MacOS12-X64-Mac1Metal-Multi-Host])
publish-min-snapshots.script(groovy.lang.Closure)
publish-min-snapshots.echo(Switching to Java 17 on Mac Docker Container)
publish-min-snapshots.sh(jenv local openjdk-17)
publish-min-snapshots.buildManifest({componentName=OpenSearch, inputManifest=manifests/3.0.0/opensearch-3.0.0.yml, platform=darwin, architecture=x64, distribution=tar, snapshot=true})
buildManifest.sh(./build.sh manifests/3.0.0/opensearch-3.0.0.yml -d tar --component OpenSearch -p darwin -a x64 --snapshot)
publish-min-snapshots.echo(Uploading darwin min snapshots to S3)
Expand Down

0 comments on commit 9043e0f

Please sign in to comment.