Hi all,
Does anyone know the right way to get the build log via rest because using artifacts delivers an incorrect url?
Getting The Reference
I have a build a build with one job1. I get the list of artifacts via this:
.../rest/api/latest/result/TRUNK-X64LINUX-JOB1-537?os_authType=basic&expand=artifacts
I see an artifact called 'Build Log' and attempt to use its 'link' to obtain it. However, link doesn't match actual location of artifact.
Concrete Links
REST link for Build Log: <bambooBaseUrl>/download/TRUNK-X64LINUX-JOB1-537/build_logs/TRUNK-X64LINUX-JOB1-537.log
Actual link for Build Log: <bambooBaseUrl>/download/TRUNK-X64LINUX-JOB1/build_logs/TRUNK-X64LINUX-JOB1-537.log
Link Format Difference
REST: /download/<project>-<plan>-<job>-<#>/build_logs/<project>-<plan>-<job>-<#>.log
Actual: /download/<project>-<plan>-<job>/build_logs/<project>-<plan>-<job>-<#>.log
I'm confused why we are seeing the difference. I could just devine the link structure via hashing the names but I'd like to have a make my solution less bamboo version specific.
Please let me know if I'm not following an appropriate REST path for accessing the build log
Thanks
Peter
Community moderators have prevented the ability to post new answers.
You should be able to use Result resource. Just add expand=logEntries instead of artifacts.
.../rest/api/latest/result/TRUNK-X64LINUX-JOB1-537?os_authType=basic&expand=logEntries
Seems there is no way to get *just* the log count.. We are seeing really bad peformance issues around the JMS tailLog .onMessage() event and trying to track down offending plans. Even the "size" of logEntries is impacted by max-results, and so to get adequate details need - https://server/bamboo/rest/api/1.0/result/PLAN-JOB-80?max-results=2000000 - and that is brutally slow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Er sorry, my point was - is this something I can query from the DB? LOG_SIZE on BRS table is null for completed jobs.
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.