I'm working on a multibranch (A) job that is being triggered from another one (B). I want to do the deploy of my project only if there are changes in this project (A). By changes I mean from the last build of this job (I've seen the jenkins pannel gives you this info when you build, so I thought it would be possible to read it somewhere).
)
So, is there any way of checking it in a pipeline?
Finally I found the answer. If you just want to know if there are changes in that build you can do:
if(currentBuild.changeSets.size() > 0) {
//There are changes
}
else {
//No changes
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With