Hello,
in our organisation we are using a dedicated Bitbucket Server instance and Jenkins as a Build Server. Our development is strictly pull request based. The build jobs in Jenkins are configured as descriptive pipelines and automatically created/triggered on new pull requests.
We have following problem with this setup:
If someone creates simultaneously 2 pull requests based on the same commit id but having different target branches, Jenkins will automatically create for them 2 PR-Buildjobs. But the build status notification from Jenkins from each of the created jobs will be applied to the both PRs, because they have they same commit id.
Thus Jenkins may suggest, the both PRs builds are successful, even if one of them failed (different target branches may lead to different build status!).
Current behaviour:
PR1 ==> BUILD 1 ==> notifies PR1 and PR2
PR2 ==> BUILD 2 ==> notifies PR1 and PR2
Expected / desired behaviour:
PR1 ==> BUILD 1 ==> notifies PR1
PR2 ==> BUILD 2 ==> notifies PR2
Is there any possibility or workaround to solve this issue?