Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
Jenkins 2.319.1
git version 2.30.2
bitbucket plugin 1.11.1
Description
Jenkins triggers builds of jobs even though the merge into Bitbucket does not include any files that are in the Included Regions values for the Jenkins jobs. This happens often. It might be a coincidence but the most recent time when this happened the jobs that triggered incorrectly were the jobs that had most recently triggered. So
Saturday 19 Feb - Merge commit X into master
Jenkins triggers jobs A,B,C,D - correct
Tuesday 22 Feb - Merge commit Y into master
Jenkins triggers jobs A,B,C,D but these jobs should not have triggered because commit Y does not change any files in the Included Regions values of jobs A,B,C,D.
Checked the Bitbucket webhook Request and it looks correct. It does include
"fromHash": "X", "toHash": "Y"
Is Jenkins maybe triggering the jobs again based upon the "fromHash"?
fame as you can see from https://github.com/jenkinsci/bitbucket-plugin/blob/1492ad6ecc3de53b51f811bb16e83d6ac76c4809/src/main/java/com/cloudbees/jenkins/plugins/BitBucketTriggerRunnable.java#L46, we are calling hasChanges(), if it detects changes, we run build.
Can you please provide more logs or the webhook body/headers?