Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Environment variables in the Team Concert plugin for Jenkins

Hi,
I'm developing a plugin for Jenkins in which I need to use the information entered in the SCM section of the RTC plugin (for instance: User ID, Password file, Build Toolkit...).
As far as I know, the RTC plugin exposes the RTCBuildResultUUID, but I couldn't find a documentation about this and other variables.

So, what variables are exposed to the Jenkins environment? Is there any documentation about this?

0 votes

Comments

You can find the built-in build properties provided by JBE from https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.concert.dotnet.doc/topics/r_build_prop.html&scope=null
I'm not sure if they all work in Jenkins.


Accepted answer

Permanent link
We are doing similar things. It's not very scientific but I just execeute 'env' in a Jenkins job that uses the TeamConcert plugin. This gets the list, and its fairly obvious what they are - but no documentation of course. However - I did fall over one oddity - there are both RTCBuildResultUUID and buidResultUUID, both have the same value if they are both set but under some circumstances the second one is not set. I think this happens when the Jenkins job is initiated by polling the SCM, if the job is initiated from RTC I get both values set.
Rafael Rezende selected this answer as the correct answer

1 vote

Comments

Not scientific, but solves the issue! In my case I executed set because the Jenkins server is running on a Windows machine. But you gave me the direction!

About your oddity, I have confirmed before that buildResultUUID is valid only if the request was started from the RTC client (including Personal builds). In this case, RTCBuildResultUUID will be assigned as buildResultUUID.
If the request started from Jenkins (i.e. by polling), the RTC plugin will generate the RTCBuildResultUUID on its own.
Also, the Console Output log will be reported back to RTC only if the request started from RTC. The buildResultUUID seems to be the reference between both sides.

I don't understand, however, how RTC is smart enough to catch a build result requested from outside, but not that smart to get the log file attached to it.
It's another story, anyway...
Thanks for the answer!

Brilliant - and thanks so much for the info on the log not going back to RTC. That was my next issue to look at and you just fixed it for me :-) I think I can modify the Java code that I run at the end of the Jenkins job to send the log somewhere. I wonder if I can link it to the buildResult? hmmm.

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 151

Question asked: May 27 '14, 1:41 p.m.

Question was seen: 5,596 times

Last updated: May 28 '14, 4:54 a.m.

Confirmation Cancel Confirm