The idea is:
- all devs work on their feature branches and push them to github
- jenkins starts builds (triggered by "push on github") on job test to run unit tests on those feature branches
- Once they pass the test, manager goes to github to do code review.
- If code review is fine, then this build is promoted(promote build plugin) manually to "Pass QA, Ready for prod", in "actions" section, we set "trigger/call builds on other projects" to trigger a separate job test-prod only to merge this feature branch to master on remote repo.
job test promote build config:
job test-prod SCM config:
So 2 questions here:
on step 4, we have situations like 2 conflicting feature branches both passed code review, the first branch that is promoted will be fine, but the second will have conflicts and failure, is there a way to detect conflict before? I know 'merge before build' can avoid conflict but that requires the former branch already been merged to remote master
in no-conflict cases, whenever the second job is triggered by the manually promotion, there is always an extra build caused by: "Legacy code started this job. No cause information is available", I have no idea how that happens.
Also, dont know whether the idea is correct in terms of whole pipeline, any suggestions are welcome!