-
Bug
-
Resolution: Unresolved
-
Major
-
Jenkins: 2.401.3
Bitbucket Server Integration Plugin: 3.6.0
Bitbucket Server: 7.21
Hi,
we have a pipeline configured with the following trigger
and:
And in Bitbucket, webhook looks as follows:
This basically means we want to have pipeline executed every time something is pushed to "master" branch only.
However we noticed that the pipeline is also triggered when:
- any new branch is created
- or any new push to those other branches is performed
In both cases the event triggered by Bitbucket is :
X-Event-Key: repo:refs_changed
"changes": [ { "fromHash": "c3a812f6132fb289616d1dfd2ea5d431fcca2553", "ref": { "displayId": "feature/anothertest", "id": "refs/heads/feature/anothertest", "type": "BRANCH" }, "refId": "refs/heads/feature/anothertest", "toHash": "bd191884f531a371688d3c9b3248a8a573f3d74d", "type": "UPDATE" } ], ...
So it seems "Branches to build" is completely ignored and not taken into consideration when triggering the job.
Could you please check if it is a bug indeed or it works as designed?
Edit:
One more thing to add regarding "Branches to build". It also seems that when we use env variables (ie. GIT_BRANCH) they are not evaluated later on.
In result we can see the following at the very beginning of the job:
git rev-parse refs/remotes/${GIT_BRANCH}^{commit} # timeout=10
and git, of course, fails to get anything.
Not sure if those two things are related, just sharing so you have a full picture.