How to retrieve artifact links from a build record
During our (Ant based) build process, we're using the artifactLinkPublisher task to link the resulting binaries (> 1GB on a shared drive) to the corresponding build record. (Artifact links are shown on the downloads page of the build result in RTC.)
In RQM, we created a scheduled job that executes automated tests (using the CLA) based on the successful completion of this build. We would like to retrieve the artifact links of the build record in order to access the corresponding binaries (on the shared drive) from the machine that runs the CLA.
So far we tried to retrieve the artifact links without success:
or a better way to store/load the location of our binaries during the build/test
Edit: We're using RTC & RQM version 4.0.2
In RQM, we created a scheduled job that executes automated tests (using the CLA) based on the successful completion of this build. We would like to retrieve the artifact links of the build record in order to access the corresponding binaries (on the shared drive) from the machine that runs the CLA.
So far we tried to retrieve the artifact links without success:
- There's no "artifactLinkRetriever" Ant task.
-
There's no related built-in execution variable in RQM (that could be passed to our CLA).
- The RQM Reportable REST API does not contain the artifact links of the build record.
or a better way to store/load the location of our binaries during the build/test
Edit: We're using RTC & RQM version 4.0.2
Accepted answer
Hi Philipp,
There is no public API to do this, but there is an internal Rest API that would allow you to get the download contributions.
PUBLIC_ROOT_URI/resource/virtual/build/result/BUILD_RESULT_UUID/contributions?type=com.ibm.team.build.common.model.IBuildResultContribution.artifact&_prettyPrint=true
where PUBLIC_ROOT_URI might be https://localhost:9443/ccm and BUILD_RESULT_UUID would be as it says. The _prettyPrint query arg is just for debugging. A REST client would normally specify a header: Accept: text/json and not add the _prettyPrint query arg.
Scott
There is no public API to do this, but there is an internal Rest API that would allow you to get the download contributions.
PUBLIC_ROOT_URI/resource/virtual/build/result/BUILD_RESULT_UUID/contributions?type=com.ibm.team.build.common.model.IBuildResultContribution.artifact&_prettyPrint=true
where PUBLIC_ROOT_URI might be https://localhost:9443/ccm and BUILD_RESULT_UUID would be as it says. The _prettyPrint query arg is just for debugging. A REST client would normally specify a header: Accept: text/json and not add the _prettyPrint query arg.
Scott