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
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**
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sangeetha,
You'll find this file temporary under <bamboo-agent-home>temp/log_spool folder
Example below
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.