Question: How can I get files from the Jenkins workspace into XL Release?

Follow

Cath Tayag -

I am triggering a job in jenkins (from XL Release) to carry out code analysis. Is it possible to get the coverage reports(generated as .csv format) as an attachment to xl release ?

Ayush02  July 27, 2015 16:39
 
===============================================================
 

Hi Ayush

Thanks for posting! As far as I am aware, adding attachments is not currently possible using the public API. In order to access information such as this, we internally tend to use links to the documents, rather than attachments, since that avoids duplication of data.

If it's necessary to look at the data from within XL Release, without following a link to an external system, we usually retrieve the data and paste it as a Markdown code block in a comment. XL Release comments are Markdown-aware, and this usually renders the file content in a way that's pretty easy to read.

Here are some screenshots from a simple example template that demonstrates both approaches.

Hope that helps!

Andrew

PS: If possible, I would recommend storing the desired file as a build artifact in Jenkins, rather than keeping it in the workspace. That avoids the possible race condition in which a new build of the job is kicked off and overwrites the file we're trying to retrieve before we have a chance to capture its contents.

Have more questions? Submit a request