Accessing Composite BuildId inside dependency build step script
We have a composite build configuration 'A' which has a snapshot dependency on build configuration 'B', 'B' is a regular build configuration which has its own set of snapshot dependencies 'X', 'Y', 'Z'.
Inside the build steps of 'B' we use a simple command line step and we would like to construct a URL pointing to the parent build 'A', for example:
https://tc.example.com/viewLog.html?buildId=<buildID for 'A'>
We have been searching but can't find a way to programmatically determine the 'buildId' for 'A' which started the current build of 'B', any help would be greatly appreciated.
Please sign in to leave a comment.
Hi Alex,
I don't think there is a direct parameter to get it. The closest I can suggest is to check the REST API. Build IDs are assigned as soon as a build is added to the queue, so it should be possible for you to query the REST API for running builds of composite type, you can refine the search to avoid collisions and figure out your build ID that way. Would that work for you?