It's all about the answers!

Ask a question

How to retrieve artifact links from a build record


Philipp Hoffmann (8124) | asked Aug 19 '13, 10:16 a.m.
retagged Aug 27 '13, 2:57 p.m. by Ralph Earle (25739)
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:
  • 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.
Is there any way to retrieve 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


permanent link
Scott Cowan (966310) | answered Aug 22 '13, 4:52 p.m.
JAZZ DEVELOPER
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
Philipp Hoffmann selected this answer as the correct answer

Comments
Philipp Hoffmann commented Sep 05 '13, 10:47 a.m.

Hi Scott,

thank you for sharing this information!
Note that this URI needs to be build for the RTC (rather than the RQM) server.

Your answer


Register or to post your answer.