We are seeing duplicate builds triggered on Jenkins multibranch pipeline projects. Builds are normally triggered using push notifications from Bitbucket using this plugin: http
As the other answer already suggested the "Do not allow concurrent builds" option is what you want.
And you can get that via the Jenkinsfile
:
properties ([
buildDiscarder(logRotator(artifactNumToKeepStr: '5', daysToKeepStr: '15')),
disableConcurrentBuilds()
])
EDIT:
This is not the solution for the actual problem here. but it still seems helpful to some people, so I'll leave it as long as we don't have a better answer.