Teamcity build on every git commit vs build on pull request -
we setting teamcity our project uses git. have debate on if should trigger build on every commit or on every pull request.
if push branch a, , have configured build on pull request on master build triggered on how merged code appear or build branch ?
lets imagine have configures our teamcity build every pull request
now lets have branch master, developer checksout branch ftb_a. creates new test case , commits. developer code not yet merged master. develope b creates new branch ftb_b creates new test case. developer pushes branch , raises pull request build runs test case added develope runs. pull request developer merged , newly created tesr case available in master now.
now developer b pushes branch, has not rebased branch i.e. test case added developer not available in brach ftb_b. developer b raises pull request. build triggered. question when build triggered pull request raised developer b test case added developer in master run or not
though not indicated, i'm going assume using github here.
in short: yes, pull request ftb_b updated time changes pushed master. however, must trigger build on pull request branch, not on ftb_b itself.
to explain: when pull request ftb_b created, github generate new (hidden) branch consists of changes ftb_b merged tip of master. enables review changes, run teamcity builds against , perform other steps might want before accepting pull request. if pull request ftb_a accepted before creation of pull request ftb_b, these changes naturally included in pull request branch. if pull request ftb_a accepted after creation of pull request ftb_b, github detect change in master branch , update pull request branch you. in either case.
the flow might this:
- ftb_a pull request created
- ftb_a pull request branch created automatically github
- ftb_b pull request created
- ftb_b pull request branch created automatically github
- this branch not include changes ftb_a @ point
- ftb_a pull request accepted
- master updated
- ftb_b pull request branch updated automatically github
- now changes ftb_a reflected in pull request branch
check out more info:
https://blog.jetbrains.com/teamcity/2013/02/automatically-building-pull-requests-from-github-with-teamcity/
Comments
Post a Comment