Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins starts Duplicate builds from same commit Multibranch pipeline

We're seeing multiple builds of our Jenkins multi-branch pipeline being triggered by the same merge commit in Bitbucket.

One build is marked triggered by a: "Branch event at "

The other by a: "commit notification "

We have our Jenkins urls setup in a plugin

Bitbucket Server Webhook to Jenkins

and have a our trigger in the Jenkinsfile setup as follows:

triggers {
    pollSCM ""
    cron "H 0 * * *"
}

There seem to be a couple of old questions that unfortunately don't have concrete answers.

like image 225
Kai Avatar asked Jan 17 '18 16:01

Kai


1 Answers

We were using Bitbucket with Jenkins integration and had this issue. Our problem was that on the Bitbucket webhook we had selected notifications from push and from PR. This configuration created a Job with the branch name and a second job called PR-XXX when the PR was created.

Maybe this is the reason?

like image 179
Julian López Avatar answered Nov 02 '22 08:11

Julian López