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

Bamboo Deployment Live logs write to Log File

sangeetha May 10, 2024

Is there a way to capture live deployment logs and write a log during the deployment environment execution in Bamboo.  Could see that the logs are placed in "Bamboo-Home"/temp/logspool before uploading to bamboo server. Is there a way to read the file before it gets uploaded to Bamboo server or any other mechanism of writing the logs to file

1 answer

2 votes
Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 12, 2024

Hello Sangeetha,

Welcome to Atlassian Community.

If you have enabled Live log transmission you'll be able to see the Live logs from the agent during the deployment process on Bamboo GUI.

When the deployment is run these logs files are available on the agent file system and then transmitted to Bamboo server post build completion, you can try to read the file from the agent file system if you wish before it is transmitted to Bamboo server.

Let me know if this answers your query ?

Regards,

Shashank Kumar

**please don't forget to Accept the answer if your query was answered**

 

sangeetha May 16, 2024

Thanks for getting back. Our requirement to write the logs whichever is shown in Bamboo GUI to a logfile as a last step in the Deployment process. Could you please suggest the steps on achieving it. Currently I am able to get the Bamboo GUI Logs only after deployment has completed via REST API which does not meet our requirement. I am unable to get the exact path in Agent where the deployment logs are saved. Could see a log file getting created in Bamboo-Home"/temp/logspool in Agent before it gets uploaded to server. Thats for a fraction of second which I could not read it.

Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2024

Hello Sangeetha,

You'll find this file temporary under <bamboo-agent-home>temp/log_spool folder

Example below

image.png

Here 1900545 is the deployment project id

          1966081 is the deployment env id

          4227073 is the deployment result id of the deployment in progress

Regards,

Shashank Kumar

sangeetha May 18, 2024

Hi @Shashank Kumar  . As mentioned earlier, yes I see the file for a fraction of second. But I could not read the file. Is there a possibility to read the file during the last task of the existing deployment.

Get-Content : Cannot find path 'C:\Users\XXXX\bamboo-agent-home\temp\log_spool\1245185-1310721-1933314.txt' because
it does not exist.

Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 19, 2024

Hello Sangeetha,

The file will be immediately transferred to the Bamboo server the moment Build completes, that's the reason why you are not able to read the file.

There are few things you can do here.

1. As you suggested you can read this file during the last task probably use a script task in Bamboo to read this file, there is no customised solution available within Bamboo to read this.

2. You can probably put a sleep command within a final script task so that the build runs a little longer so that you have enough window to read this file outside of Bamboo.

Regards,

Shashank Kumar

Like Steffen Opel _Utoolity_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events