Reputation: 6693
I have a teamcity project running a build against github repo. On completion of the build, it uses a build feature of teamcity named "Report Change Status to Github" which reports the build status using - https://api.github.com
Now I would like to have another teamcity project run a build against the same github repo and report the build status to github.
How do I make github display the 2 status checks differently? Despite the 2 builds reporting status to github, github just displays "1 pending check" or "1 status check completed successfully"
Upvotes: 7
Views: 6040
Reputation: 2108
Edit: I didn't realize you already have the plug in installed, but I am going to leave the steps for other users. I think you need separate build configurations and to make sure you customize the context
setting.
I was playing with this today and you can't use JetBrains "Commit Status Reporter" to do this. You can use this plugin though: https://github.com/jonnyzzz/TeamCity.GitHub
It wasn't straightforward to install--
Log in as guest
): https://teamcity.jetbrains.com/viewType.html?buildTypeId=bt398 and teamcity.github.zip
and it will download a zip fileUpvotes: 12
Reputation: 18762
Statuses are created with something called a context:
https://developer.github.com/v3/repos/statuses/#create-a-status
For each commit, the latest status for each context is shown. And for the pull request overall (next to the merge button) the latest per-context statuses of the latest commit in the pull request are shown.
This means that if you want multiple status checks to show up -- those statuses need to be created with different contexts. And that's something defined by the application which is creating statuses, not GitHub. GitHub only displays the statuses.
Upvotes: 3