It's all about the answers!

Ask a question

Integration with Jenkins 1.523 and RTC 4.0.2


chung Lin (1036) | asked Dec 08 '13, 11:57 a.m.
My question is when ever we trigger a build from RTC to Jenkins we will have two build result, but if we trigger the build from jenkins there would be just one. Is there a solution for this?

Our Setup:  
  1. Jenkins v1.523
  2. RTC client 4.0.2
  3. build toolkit 4.0.2
  4. We use ant to run the build.xml file

Accepted answer


permanent link
Scott Cowan (966310) | answered Dec 09 '13, 11:54 a.m.
JAZZ DEVELOPER
edited Dec 09 '13, 11:55 a.m.
Hi Chung Lin,

I think what is probably happening, is that the buildResultUUID property on your Jenkins job is not getting created.  It is the existence of this property value that the team concert plugin uses to decide if a new build result needs to be created.  I don't recall if there's a problem in 4.0.2, but if you manually add a String property to your job, it should fix it.

Scott


chung Lin selected this answer as the correct answer

Comments
chung Lin commented Dec 09 '13, 12:43 p.m.

 Hi Scott, 


That is exactly what we missed. But I'm not sure how to set the property environment variable in the build.xml file. 
<property environment="env" />
<property name="buildResultID" value="${env.RTCBuildResultUUID}" />
    
This is what we use in the Build.xml file
buildResultUUID="${buildResultUUID}" instead of 
buildResultUUID="${buildResultID}" from the complie-and-test example. 



Scott Cowan commented Dec 09 '13, 2:24 p.m.
JAZZ DEVELOPER

In this section, you should be getting the RTCBuildResultUUID environment variable, setting it to buildResultID and then subsequently passing it to the different Ant tasks.


chung Lin commented Dec 09 '13, 3:42 p.m.

Hi Scott,


Thank you for been so patient with me! It seems like whenever the build reaches -Ant build.xml file it started to create another build result. This happens is it because I run the Ant script in the post build task instead of using Invoke Ant?

Thanks 

Chung


Scott Cowan commented Dec 09 '13, 4:11 p.m.
JAZZ DEVELOPER

That sounds like a reasonable cause.  I haven't tried that myself.  But I believe we complete the build result by that point.

2 other answers



permanent link
Scott Cowan (966310) | answered Dec 09 '13, 9:28 a.m.
JAZZ DEVELOPER
Hi Chung Lin,

Please take a look at https://wiki.jenkins-ci.org/display/JENKINS/Team+Concert+Plugin.

Scott

Comments
chung Lin commented Dec 09 '13, 11:36 a.m.

Hi Scott, 


That is the exact instuction that we followed, but we still get two build result if we trigger the job from RTC client. 

This is what we see in the RTC build result. 
please see below answer...

We know that if we trigger from RTC we will get the label test[154] and if we trigger from Jenkins we will get test#154. What we don't understand is why there is an additional build result if we just trigger the build ONCE in RTC?

Thanks
Chung



permanent link
chung Lin (1036) | answered Dec 09 '13, 11:36 a.m.
 This is what we see in the RTC build result
Label Progress  Estimated completion           Start Time  Duration 
test #154 Completed   12/6/2013 17:20      9 minutes 11 second
test [154] Completed   12/6/2013 17:20     9 minutes 30 second

Your answer


Register or to post your answer.