Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Pull Request 'Merge' option enabled before it's build completion

arivazha June 30, 2020

I have a strange scenario - we have configured jenkins so that a build runs for each commits using 'Multibranch pipeline' job for any branch and importantly my Jenkins 'master' node is set to ONE executor, so it can run only one build at a time. Please read the flow

1. Developer commits a code in branch 'A' - build runs successfully 

2. Creates a PR from branch 'A' to 'master' branch - 'Merge' option is enabled by default since the last commit build is success in branch 'A'

Based on the result of the PR build, if it is Success it should enable 'Merge' option as I have set 'Minimum successfull builds -1' as a Merge Checks. 

Since, I have one executor in jenkins 'master' node PR build is in queue as it is still processing other jobs - in the meantime, the PR take the last commit's build status in branch 'A' and consider it as a PASS for the 'Merge Checks' and allows the Developer to Merge the branch 'A' to 'master' branch. This is clearly by-passing before knowing the status of the PR build. However, "Merge" option is disabled if the PR build has started. 

Please let me know if I didn't explained the scenario clearly, is there any extra configs requires to address this issue.

Thanks in advance,

Ariv

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events