pipeline {
agent any
stages {
stage('sample_1') {
steps {
script {
if(true) {
lock(label: 'Resource1') {
sh label: '', script: 'echo $JAVA_HOME'
sleep time: 1, unit: 'MINUTES'
}
}
else{
lock(label: 'Resource2') {
sh label: '', script: 'echo $JAVA_HOME'
sleep time: 1, unit: 'MINUTES'
}
}
}
}
}
}
}
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/e5f2b486-5926-454c-b249-ced8821d670f%40googlegroups.com.