"GitHub Pull Requests" feature usage for dedicated Pull-Request build
Hello,
With TeamCity 2018.2, the GitHub Pull Requests feature seems nice (and magic!).
Is it possible to use it on a dedicated "pull request" build ? (Sometime, this build could be different than master branch for sample).
On TeamCity 2018.2.1, when you:
- Configure a VCS with master branch as default and no "Branch specification" (=> Remove the workaround of "+:refs/(pull/*)/merge" to build PR)
- Configure a build linked to this VCS
- Configure on this build the features "GitHub Pull Requests" & "Commit status publisher" (Test button OK for both)
- Remove any trigger on this build
- Configure (GitHub) commit hook on this build
When a pull-request is created, nothing is started and this build doesn't contain the blue box with branch run capacity ; like this build was only linked to master branch.
Is there a way to check if this feature is working well or if provide any errors ?
Perhaps I have misunderstanding the behavior of this feature and how/where can be used.
Many thanks.
Best regards.
Alix.
Please sign in to leave a comment.
Hi Alix,
Thank you for letting us know about the issue you are experiencing.
First of all you still need a VCS trigger for your build to be triggered. The webhook just replaces VCS polling for changes, to make changes detection more effective.
Secondly there are few things to check:
1. Please check what kind of authentication are you using in the GitHub Pull Requests build feature: is it the one from the VCS root, personal access token or OAuth token? In case of "VCS root" authentication, what authentication is used in the VCS root? Also what is the role of the user to which these credentials correspond in respect to the repostiory?
2. There is an author's role filter in the build feature, the default setting is "members of the same organisation". In case of the repository that belongs to a person (not an organisation), it will only trigger the PRs coming from the owner of the repostiory. So please check if the pull requests are not filtered out on the basis of their author's role in respect to the repo.
3. Please check if all the same configuration works without GitHub webhooks, i.e. with regular VCS root polling.
4. Please also check if commits into regular branches (say in master) are detected when GitHub webhooks are used.
Please come back to us with all that information, also if you find any warnings or errors in teamcity-server.log that mention pull requests, please provide us with relevant fragments of the log (obfuscating all sensitive bits of course).
Thanks!
Anton
Hello Anton,
Thanks for explanation (and sorry for my answer delay).
Creating a new (public) GitHub repository & new TeamCity config build using integrations (=> magic stick with https repository connection & personnal token for authentication ; so efficient/nice features by the way), it works like a charm with a "+:pull/*" trigger branch.
I will go back on my previous existing project and check if configuration was bad, or if different behavior could occur on private projects and/or (ssh) deploy key authentication.
Best regards
Alix