I'm setting a Multi-Branch pipeline in jenkins blue ocean. Everything is starting to work nice.
One thing I've noticed is that once a while, I get an execution of the job named: "Branch indexing" running.
My build contains some heavy unit testing and code coverage, that take ~4h30 to be executed, so having this job randomly executed 2 times is not really good(not even taking in account that we have 6-8 active branches, so it would mean that the executions will only stacks.
So:
1) What are those executions? 2) Is this absolutely required? 3) Can I disable it?
In Jenkins, we can create a stage to abort branch indexing.
stage('Branch indexing: abort') {
when {
allOf {
triggeredBy cause: "BranchIndexingCause"
not {
changeRequest()
}
}
}
steps {
script {
echo "Branch discovered by branch indexing"
currentBuild.result = 'SUCCESS'
error "Caught branch indexing..."
}
}
}
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