Change workspace build property programatically
![]()
Hi guys,
I was wondering to know if possible to change the build definition workspace programatically. As everything in my build definition for zOS is identical except an environment variable, target environment and the workspace to use. I would like to execute (by RTC API) the build definitions from buildforge just by changing the workspace to use and one environment variable. Is that possible? I'm trying buildDefinitionObj1.setConfigurationProperty("com.ibm.team.build.jazzscm","team.scm.WorkspaceUUID","_-cPrEJg1EeCIwcUNsKUI8Q"); but not sure if is going to work. Thanks |
4 answers
![]() Hi guys, Hi, This example code will change the workspace.
Brent Ulbricht RTC Build Lead |
![]() Hi guys, Hi, This example code will change the workspace.
Brent Ulbricht RTC Build Lead Ohhhh Brent, That's perfect!!! I have either solved the issue by creating a build property by API called team.scm.WorkspaceUUID with value UUID of workspace I want before the build runs and it worked as well. Thanks a lot for your quick and right reply Brent. |
![]()
Hi Brent,
I was initially getting the build definition as shown below using ITeamBuildService: ITeamBuildService buildService = getService(ITeamBuildService.class); IBuildDefinition buildDef = buildService.getBuildDefinition(buildId); String buildDefId = buildDef.getId(); How is this different from getting build definition from
ITeamBuildClient as you have shown in your answer above?
What is the difference between a TeamBuildService and a TeamBuildClient?
Ananya
|
![]() It depends if you're using PlainAPI (client side) or SDK (server side). You can also change programmatically the repository workspace directly on the request (which is the instance of the build definition).
Michele. |
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.