Pull Request Build Feature only runs the builds against the default branch

We have a build chain with 6 dependencies. We have added a Pull Request build feature on our build chain which will look for Github PRs and if there's any, it will trigger the build chain. The VSC root attached to the Build Feature has these for default branch and branch specifications : 

The VSC Trigger is this : 

 

 

Everytime I create a pull request on Github the build chain does get triggered but it always runs the builds against master.

For example, I create a PR from my testing branch TEST-1 to develop branch, the build chain gets triggered just fine but the builds run against the master branch, which is not what I'm trying to achieve. Ideally I would like the builds to run against the TARGET branch

 

Is this intended, I'm probably doing something wrong because it doesn't make sense not building other branches?

 

 

This is also the Build Feature Pull Request : 

0
2 comments
Hi! Please clarify which builds run in the default branch. If you mean the dependencies of the triggered build configuration, such behavior is expected and is explained in this comment:
https://teamcity-support.jetbrains.com/hc/en-us/community/posts/9631869346578/comments/9880861308946

If you need to run the build in the target branch of the pull request, you can use this workaround:
https://youtrack.jetbrains.com/issue/TW-62734/Proper-support-for-preliminary-merge-commits-of-pull-request-branches-is-required#focus=Comments-27-4930411.0-0

0

Hey Anatoly Cherenkov, thank you for your swift reply. I mean the dependencies of the triggered build config, that is correct. What I also meant is I need the build and its dependencies to run against the SOURCE branch sorry for the confusion above. 

I believe I've found a workaround but I would need some confirmation it should work before I go ahead and implement it.

 

If I have the above as configured in the images that I sent, and I also create a Pull Request Build Feature for each of my dependencies(6 in total), it seems it runs a build on Pull requests with <pull/number> which is fetched from github and it takes the latest hash commit from the source branch to run the build against.


If so that satisfies my needs and we're happy with it

 

 

0

Please sign in to leave a comment.