I have a job that will create files, unless one of the values being fed to it matches an older value. What's the cleanest way in Jenkins to abort or exit the job, without it being FAILED
? It exiting is the correct behavior so I want the build marked SUCCESS
.
It'll end up in an if statement like so;
stage ('Check value') {
if( $VALUE1 == $VALUE2 ) {
//if they do match exit as a success, else continue with the rest of the job
}
}
I don't want to throw an error code unless that can somehow translate into it being marked a successful build.
exit 0
...return 0
, all in all any end of the groovy code which doesn't throw an exception should do I think. I'll let someone with more background on jenkins 2 confirm or infirm