Commit status publisher, github and composite builds

Forgive the possibly dumb question.

I have a Teamcity enterprise, a github enterprise, a series of configurations A, B, C, and D.  I also have a composite build ABCD.

In github, I have branch protection insisting on ABCD (before it will allowing PR merges).

I observe from the github interface that the status publishing does not seem to register on ABCD.

I _can_ see that the status publishing works for the individual A, B, C and D. 

Since composite builds don't use an agent -- is the commit status publisher build feature even expected to work?

Certainly there's no problem with me setting github's branch protection to insist on the indivual statuses -- but I was hoping to control all the things simply by changing my big build chain of ABCD.

 

0
3 comments
Hi Georg,

Yes, commit status publishing should work from composite builds, even in normal builds the status publishing happens from the server side, not directly from agents, since it's the server which ultimately determines the status for the build. It is also a common use case to have composite builds be the ones to report the build status since chains can be arbitrarily long and most of the time only the final result is of interest. The one condition is that ABCD, being a build configuration, still needs to have the VCS Root attached to it. Since there is no build agent, there will be no checkout for it, you don't need to worry about space or time spent on that, but in order to report the build status, the feature requires access to the vcs root. Currently statuses are only reported if the feature is added to a build with the VCS Root where it should be reported.

If you already have it correctly set up, am I understanding you correctly that A, B, C and D report the status just fine but when ABCD finishes it doesn't report anything? I assume that the commit status publishing is configured for all 5? Did you try with configuring it only on ABCD? Are you interested in all 5 statuses being reported? I'm not aware that it shouldn't work, but I want to make sure I understand your exact set up.
0

That's correct, I have all 5 configured to report status but I am only seeing status from the 4 non-composite builds (TC version 20.10.2).

What I would like is to have the composite build report (and be able to make github use the composite build to block merges). That way, there can be a single point of control (configuration) over what's in the composite and thus what needs to work before PR merged can be allowed.

This is not any kind of show stopper, just a nice to have. I am perfectly happy to entertain suggestions that "we're doing it wrong" and that there is a better way :)

 

0

I discovered that I had the target branch filter misconfigued (`main` instead of `refs/heads/main`) -- now it's working correctly.

0

Please sign in to leave a comment.