Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Saving build log doesn't save entire log Edited

I'm succesfully saving the build log using the `wget` version of the `curl` example [here](https://confluence.atlassian.com/bamkb/how-to-save-a-build-log-as-an-artifact-892498832.html)

And it works. But,

the saved log doesn't contain the entire log. Ok, so I'm aware that it won't save the very end of the log since after the finale stage (i.e. the saving stage) artifact are being stored and that produces some log. Thing is, the log I'm saving isn't saving more than like two stages before the final stage is called. That's where my log ends.

I've tried delaying using `sleep` `timeout` and `ping` up to 30s without any improvement to the content of my saved log.

___________________________ 

REPHRASING:

Tried saving the build log using:

wget -O my_build_log.txt --user=myuser --password=mypassword http://bambooserver/download/${bamboo.buildKey}/build_logs/${bamboo.buildResultKey}.log

and it works, but it does not save the log produced up until the wget-call is executed... it saves the log from a while before the call.
I've tried adding

sleep
timeout
ping

to delay the call to wget up to 60s.. doesn't help.

 

 

___________________________

Question 1: Is there a better way to save the log (so that I at least get log text up to where the saving stage takes place)?

 

Question 2: What is like the "refresh rate" of the log by Bamboo? Because it seems to update the log in intervals, but I don't know if it's time dependant or task dependant

1 answer

1 accepted

1 vote
Answer accepted

Hi Nima,

Thanks for reaching out to the Atlassian Community today! Please allow me to address your questions inline, below.

Question 1: Is there a better way to save the log (so that I at least get log text up to where the saving stage takes place)? 

Unfortunately this is currently the only known way of retrieving the logs while the build is running. The logs are streamed over the Java Message Service, and they are passed via a buffer, which does take some time to show. The only alternative would be to access the logs from the filesystem, but these would be the same as those we retrieve using cURL or wget. 

Question 2: What is like the "refresh rate" of the log by Bamboo? Because it seems to update the log in intervals, but I don't know if it's time dependant or task dependant

The log is technically refreshed every second, however, data that is in the buffer may not show right away. The log is indeed updated in intervals, but the interval is based on the buffer. 

If possible, could you please try with a longer sleep command, maybe in a task of its own? 

If you have any other questions, please don't hesitate to reach out!

Thanks,

Elias | Bamboo Support

Thank you for your answer.

The extra delay doesn't seem to help enough, and adding even more delay is not pretty :)

As a workaround, I'm going to create a separate plan as a final stage which collects all logs from relevant plans.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

256 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you