I have a simple pipeline job with a single stage:
timestamps {
node ("jenkins-slave-small") {
stage('Stage 1') {
sh "echo 'stage2 echo'; sleep 500s"
}
}
}
I am testing whether or not /safeRestart waits for my pipeline to finish executing, but it seems like it's not.
Logs:
[Pipeline] { (Stage 1)
[Pipeline] sh
+ echo stage2 echo
stage2 echo
+ sleep 500s
Resuming build at Thu Sep 26 18:14:18 UTC 2019 after Jenkins restart
Waiting to resume part of test-folder » test-pipeline-no-parallels #6: Finished waiting
Ready to run at Thu Sep 26 18:14:55 UTC 2019
Am I misunderstanding how /safeRestart is supposed to behave or is that the intended behaviour?