I ran into a problem, while using this snippet on a Multibranch Pipeline
if (currentBuild.rawBuild.getCauses().toString().contains('BranchIndexingCause')) {
print "INFO: Build skipped due to trigger being Branch Indexing"
currentBuild.result = 'ABORTED' // optional, gives a better hint to the user that it's been skipped, rather than the default which shows it's successful
return
}
pipeline{
........
While the code itself is doing its job just fine and aborting the build i still get
[Bitbucket] Notifying pull request build result
[Bitbucket] Build result notified
I want to skip bitbucket notify, because whenever the previous build is successful this piece of code will make it appear as it is failed, thus creating a confusion..
How can i leave the last result on display in Bitbucket
Isn't this snippet aborting the build before it even runs due to its placement in the Jenkinsfile