How to report Jenkins results to Jazz build engine
Hello all,
we have currently the following setup: - We are in the process of introducing RTC, but have so far only introduced the change management part. - currently using SVN for SCM (potentially changing to RTC in future) - Jenkins for continuous integration and build automation. As Jenkins is established and working with SVN, and RTC SCM not yet used, I would like to get Jenkins to report the build results to RTC. All manuals and information I have read so far was focussing on using RTC SCM as SCM, and not anything else. This leads of course to using the RTC Jenkins plugin and not the SVN plugin (it is either or). I have managed to set up RTC and Jenkins in a way that builds can be started from RTC and the results are reported. When starting the build in Jenkins however, RTC seems to not get any information on it. Is there any way to accomplish this by means of a setting, or is it required to create an ANT task to "manually" transfer all the information? Thanks! |
Accepted answer
Hello all,
I was not really happy with the fact that it is only possible to
What I did is probably not the nicest thing ever, but it works to have the build status information on both sides, independent from where you start the build. I wrote an Ant script to update RTC. The script is executed after the actual build is finished to get the correct status. I actually used a 2nd Jenkins job to do this because I did not figure out how to run an ant task as post-build-step, but I am sure it could also be done in this way
All it does is collect the status information and if the build was not triggered from RTC it posts the status and a link to Jenkins to RTC
So here we go:
---------- content of the build.xml file: NOTE: I did not manage to get the content in here without being messed up. I hope it is fairly clear though. Specifically the <br=""> tags do not belong into the file, but they are somehow generated by the forum when posting... <project name="postResultsToRTC"> <description> Ant script to post Jenkins build results to IBM CLM Parameters to be set for the Ant call -lib C:\IBM\TeamConcertBuild\buildsystem\buildtoolkit all Further parameters to be set (in Jenkins or via -Dxxx in the Ant call) rtcRepositoryAddress rtcBuildDefinitionId rtcBuildEngineId jenkinsJobBuildURL - build URL of job to report to ALM jenkinsJobDisplayName - displayed name in ALM buildResultUUID - buildResultUUID (set in original job) </description> Ralph Schoon selected this answer as the correct answer
Comments
sam detweiler
commented Jan 11 '16, 1:50 p.m.
Very cool.. thank you for posting this info. hopefully it will help others..
|
3 other answers
When having:
- the RTC SCM-plugin in Jenkins : here you link to RTC using the field "use a build definition for better RTC integration" - a "Jenkins Build Definition" in RTC : here you can refer to your Jenkins-job you should be able to launch and see the results on both sides. Jenkins will use the RTC Build Toolkit to perform the build. Comments
Christian Opitz
commented Jan 04 '16, 12:06 p.m.
This however will only work when selecting and configuring RTC as Source-Code-Management, right? (it is not sufficient to have the plugin installed)
No.. you don't HAVE to use JAZZ SCM. its a checkbox on the build definition. just don't check it.
Bernd van Oostrum
commented Jan 05 '16, 3:56 a.m.
@crisop that's right. When using Jenkins-SVN, you're not using the RTC Build Toolkit so there is no default feedback as RTC is not aware about what's happening in the SVN-build.
sam detweiler
commented Jan 05 '16, 8:36 a.m.
you can have a build which is a commandline, and NO SCM integration. and the build result will still be pushed back to RTC. Yes it will not have any SCM content, but that wasn't the question.
@berndyman: this might work, however, it wouldn't be really nice, because I would lose the possibility to trigger the job based on a SVN commit. The job would have to run regularly without considering any SVN changes. It could only internally check if there were changes and omit further steps, but the job itself would always have to run...
sam detweiler
commented Jan 08 '16, 12:01 p.m.
All I was saying is that you can have a build, started by RTC, which has NO SCM integration, and its build result will still be recorded back in RTC.
showing 5 of 6
show 1 more comments
|
Unfortunately the results of Jenkins Initiated Builds will not be pushed back to RTC. This is as designed currently..
only builds initiated from RTC will be updated with the build results. |
Hi,
Comments What do you mean with similar structure? If you are using a similar ANT file as above, make sure to have
<completeTeamBuild .../> at the end
Arun Kumar
commented Dec 20 '17, 11:40 a.m.
Hi,
Unfortunately the results of Jenkins Initiated Builds will not be pushed back to RTC. This is as designed currently..
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.