Skip to content

Commit

Permalink
Allow multiple agent labels
Browse files Browse the repository at this point in the history
jenkins-infra/helpdesk#4122

Run with Java 21 no matter which agent
  • Loading branch information
MarkEWaite committed Jun 5, 2024
1 parent 27f5a29 commit 83c78e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ props += pipelineTriggers(triggers)

properties(props)


node('maven-21') {
// Temporary until maven-21 agents are available on trusted.ci
node('maven-21' || 'java' || 'maven-11') {
try {
stage ('Clean') {
deleteDir()
Expand All @@ -40,7 +40,8 @@ node('maven-21') {
}

stage ('Build') {
sh "mvn -U -B -ntp clean verify"
// Temporary until maven-21 agents are available on trusted.ci
sh "[ -d /opt/jdk-21/bin ] && export JAVA_HOME=/opt/jdk-21; mvn -U -B -ntp clean verify"
}

stage ('Run') {
Expand Down

0 comments on commit 83c78e6

Please sign in to comment.