I'm seeing what I think is an inconsistency in what the teamcity.build.triggeredBy parameter and the Rest API reports. This is in Version 9.0.1 of Teamcity.
I have a build hierarchy, where MyBuild has a number of dependencies. If one of those dependencies re-builds, then MyBuild will rebuild. My goal is, via the Rest API, to be able to figure out why MyBuild rebuilt. Maybe it was a VCS change, or maybe it was because a dependency rebuilt. And if it was the latter, why did the dependency rebuild? Recurse to completion.
Looking via the web UI, I see that the parameter teamcity.build.triggeredBy gives me the name and build number of the dependency that caused my build to run.
But, if I look at my build via the rest API, /guestAuth/app/rest/buildTypes/id:MyBuild/builds/id:XXXXX
I see <triggered type="unknown" details="##triggeredByBuildType='bt196' triggeredByBuild='0.0.5.93'" date="20150309T152756-0400"/>
The triggeredByBuild attribute is correct, but the details attribute does not match the build type that 's reported by the parameter referenced above.
If I look via the Rest API for that specific build type id (/guest/auth/rest/buildTypes/id:bt196) , it's not found. Yet, in the administration page of the web-ui, if I filter the root project for bt196, the correct subproject _is_ found.
So, bt196 is known about, but somehow I can't use it via the Rest API to find the build details to see why my dependent build ran.
Am I doing this right, or is there a bug somewhere?