Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to include Bamboo build log as artifact

Paul kamis June 29, 2015

I'm trying to share some information output to stdout (and then recorded in the build log) by one of my tasks for use in a deployment.  I feel like artifact sharing would be ideal for this, but I'm having difficulty finding the directory or pattern necessary to grab the build log.  From some cursory research it looks like it should be in "build_logs" directory and a pattern "*.log" should grab it, but no luck.  Any thoughts?  Has anyone had success including the build log as an artifact?

3 answers

1 accepted

1 vote
Answer accepted
Alex Soto June 29, 2015

Hi There,

This is definitely possible, but it will require a little work on your part.

Pipe the output of your script(s) to 'tee' so you also can write a copy of the output to some file and then add that file as an artifact.

Note you may need to combine stderr and stdin using '|&' or write them to separate files depending on your needs. 

Good luck

 

Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 29, 2015

That requires you to convert every single task you have to a script task.

Paul kamis June 29, 2015

Luckily I only have a few tasks, beyond checking out the repository, and the one I need information from is already an inline script. I was able to quickly test this by simplifying my script to just a quick echo. """ echo 'TEST OUTPUT' | tee log.log """ and was able to get this saved as artifact. Thanks @Alex Soto !

1 vote
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 29, 2015

It's not possible to grab the build log as an artifact.

Paul kamis June 29, 2015

Well, that is legitimately disappointing. Thanks for the answer, though!

Alex Soto June 29, 2015

It definitely possible, see answer below. Just not as a direct point and click 'feature'

0 votes
HarryH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 29, 2015

Did you try */.log?

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events