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

How to read Workspace UUID from build definition in Jenkins Pipeline?

Hi

in my Jenkins pipeline I want to read the Workspace UUID from a builddefinition.

team.scm.workspaceUUID

How can I read that attribute inside a pipeline groovy script if I only know the name of the Build definition?

Thanks


0 votes



One answer

Permanent link
In the pipeline script, this should be available as env.team_scm_workspaceUUID after the checkout step is over.

0 votes

Comments
teamconcert buildType: [value: 'buildWorkspace', buildWorkspace: WORKSPACE]
echo " env.team_scm_workspaceUUID is " +  env.team_scm_workspaceUUID

outpuis


RTC Checkout : Fetching Completed
[Pipeline] echo
 env.team_scm_workspaceUUID is null

</pre>
<br>

 This is a known issue with pipeline build, if env is accessed before calling teamconcert, then any environment variables updated by the plugin is not visible.


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
× 12,031
× 151

Question asked: Nov 10 '16, 11:47 a.m.

Question was seen: 5,327 times

Last updated: Mar 28 '17, 12:56 p.m.

Confirmation Cancel Confirm