How to search in all already completed build logs?

I have 60+ Bamboo build agents. I want to find all build logs which have inside them a text string.

 

Is there a way to "grep" in all the logs?

 

May be there are certain approaches which may allow me to simplify the task. For each build I may see it's log as a regular text file (the file's URL is available at a Bamboo build page, it can be downloaded). Is there a place where all the files may be accessed via a command? May I iterate over each log one by one (REST API) using a programming language?

1 answer

1 accepted

1 vote

Hello Andrey,

Build logs are saved in $BAMBOO_HOME/xml-data/builds/PROJ-PLAN-JOB1/download-data/build_logs.

You can use a command like this inside this directory:

cat *.log | grep abcde

Where:

  • PROJ-PLAN-JOB1 is the full key
  • abcde is the text string to be searched.

If this answer was helpful, please allow me to ask you to mark my answer as accepted in order to have it in the top of the thread, also helping other customers.

Thanks in advance!

Kind regards,
Felipe Kraemer
Atlassian Support

I need to iterate across all build agents, across all past builds and their logs. I have a bug in my own scripts and I want to find in logs known "sign" - text string - of the bug. I do not know anything about build names (the script is universal for all projects), build times and so on.

Sorry, got it! The path is at the heading system. It works.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,321 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you