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

Creating build definitions programatically

Hi,

Can we create build definitions programatically in RTC? If yes can you provide which APIs are helpful for programmatic creation of build definitions.
Any help Appreciated

Many Thanks,
Dnyanesh

0 votes


Accepted answer

Permanent link
Hello,
similar thread here - https://jazz.net/forum/questions/77786/how-to-create-build-definition-via-sdk-api

Thanks.
Eric.
Dnyanesh Markad selected this answer as the correct answer

0 votes

Comments

Hi Eric,

Thanks for the quick reply. I want to create the server side plugin for creation of build definitions programatically. Can you help me by providing some code snippet for creating build definitions programatically.

Many Thanks,
Dnyanesh

Below is my code. Idea is creating the build definition from the existing build definition. But I am not able to find the save () method to save the build defintion created programatically.

buildService = getService(ITeamBuildService.class);
fprocessServerService = getService(IProcessServerService.class);
String projectAreaName = "PABuild";
String buildId = "PABuild build_JBEAnt";
IProcessArea processArea = fprocessServerService.findProcessArea(projectAreaName, null);
IProjectAreaHandle projectArea=processArea.getProjectArea();
IBuildDefinition buildDef = buildService.getBuildDefinition(buildId);
IBuildDefinition buildDefCopy =  buildDef.copyDefinition();
String newBuildID = "newBuildDefinition";
buildDefCopy.setId(newBuildID);

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,937
× 562
× 51

Question asked: Feb 21 '13, 5:52 a.m.

Question was seen: 5,650 times

Last updated: Feb 26 '13, 4:28 a.m.

Confirmation Cancel Confirm