RTC client does not receive Build Result logs requested from Jenkins
I understood that 'buildResultUUID' is a reference used between RTC and Jenkins. If the build request is made from Jenkins, however, this variable will be empty.
In this case, one should use the 'RTCBuildResultUUID' instead, which is generated by the Team Concert plugin for Jenkins.
(https://jazz.net/forum/questions/145781/jenkins-maven-team-concert-plugin-does-not-properly-report-back-to-rtc-that-maven-build-is-complete/146786)
Then, my issue is: When I request a build from the RTC client, Jenkins returns the complete build result, including the tab Logs. However, if I request it from Jenkins, the RTC client is still able to retrieve the build results nicely, but misses the Logs.
Is there any workaround to bring the build result logs to the RTC client even when it's requested from Jenkins?
Actually, I don't see a reason why RTC would be able to retrieve the results with details, except a link to the logs as when requested from RTC.
An additional question: why does Jenkins need the 'buildResultUUID' if the plugin itself generates the 'RTCBuildResultUUID' in any case? (and they are the exactly the same when the request is made from the RTC client)
In this case, one should use the 'RTCBuildResultUUID' instead, which is generated by the Team Concert plugin for Jenkins.
(https://jazz.net/forum/questions/145781/jenkins-maven-team-concert-plugin-does-not-properly-report-back-to-rtc-that-maven-build-is-complete/146786)
Then, my issue is: When I request a build from the RTC client, Jenkins returns the complete build result, including the tab Logs. However, if I request it from Jenkins, the RTC client is still able to retrieve the build results nicely, but misses the Logs.
Is there any workaround to bring the build result logs to the RTC client even when it's requested from Jenkins?
Actually, I don't see a reason why RTC would be able to retrieve the results with details, except a link to the logs as when requested from RTC.
An additional question: why does Jenkins need the 'buildResultUUID' if the plugin itself generates the 'RTCBuildResultUUID' in any case? (and they are the exactly the same when the request is made from the RTC client)
Accepted answer
Hi Rafael,
You may use logPublisher Ant task for this.
http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m6/topic/com.ibm.team.build.doc/topics/r_logpublisher.html
There are various ways to include Ant tasks in the build. You can use ant directly in a shell script, you can use a post-build task, for example.
To use the logPublisher task, you need to install Jazz Build Engine and point Ant to the libraries, as described in:
http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m6/topic/com.ibm.team.build.doc/topics/r_ant-tasks.html
You may use logPublisher Ant task for this.
http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m6/topic/com.ibm.team.build.doc/topics/r_logpublisher.html
There are various ways to include Ant tasks in the build. You can use ant directly in a shell script, you can use a post-build task, for example.
To use the logPublisher task, you need to install Jazz Build Engine and point Ant to the libraries, as described in:
http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m6/topic/com.ibm.team.build.doc/topics/r_ant-tasks.html
Comments
Hello Adam,
Thank you for your answer. It works.
Interestingly, I noticed that when I use post-build deliver with Jenkins (supported by JBE as in the workaround described here), the log is also published back to RTC.
It seems that JBE itself enables this.
It's still not clear, however, why RTC cannot capture the log when the buildResultUUID is generated on the Jenkins side by the Team Concert Plugin.
In any case, thanks for the answer!
Fix: When I use JBE for post-build deliver in the scenario above, the RTC receives a log but only from JBE.
So, I presume your solution is the only valid one to retrieve logs to RTC when the build is invoked from Jenkins.