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

RTC API for build definition

Hi,
For IBM i build definition, there is i project and library mapping.
Is there any build API to get/set the build definition information?
I find the RTC SDK 2.0 API only have the request build, get build result, but no build definition.

Can anyone help?

Thanks!

0 votes



6 answers

Permanent link
did u look at the build system toolkit? different than the SDK

0 votes


Permanent link
did u look at the build system toolkit? different than the SDK


I am not very clear your mean. I think the build system toolkit is for jbe?
I want to use SDK API to get/set the build definition. Could you help to clarrify more?

Thanks very much!

0 votes


Permanent link
Jia,

does this article https://jazz.net/library/article/807 provide the information you need?

0 votes


Permanent link
Thanks rschoon

But in your refered article, there is no build definition API and no i Project Mapping API.

Could you provide more information for that?

THanks!

0 votes


Permanent link
Unfortunately I have no examples for that. The best advice I can give is to

- Setup a development environment with the SDK (The extensions workshop) evenif you want to use the client libraries.
- Connect the development environment to a RTC repository
- Open the build definition editor
- Press Alt-Schift-F1 (see http://ryehle.wordpress.com/2011/11/21/finding-the-right-service-api-for-your-process-extension/ )

Use the plugin spy to go to the class implementing the editor and look up hw it uses the API.

0 votes


Permanent link
I have the following code to show the i project mapping in build definition. Can anyone help to review it? And can anyone coach me how to write the i mapping to one build definiton?

ITeamBuildClient buildClient = (ITeamBuildClient) repo.getClientLibrary(ITeamBuildClient.class);


IBuildDefinition buildDef = buildClient.getBuildDefinition(buildDefininionName, monitor);

IBuildConfigurationElement buildConfElem = (IBuildConfigurationElement) buildDef.getConfigurationElements().get(3);

List <IConfigurationProperty> buildConfigProperty = buildConfElem.getConfigurationProperties();

List<ProjectMapping> projectMappingEntries;
List projects;

for (int i=0;i<buildConfigProperty.size();i++){
String name = buildConfigProperty.get(i).getName();
String value = buildConfigProperty.get(i).getValue();
System.out.println("name:" + name + "---value:" + value);
}

The output is the following:
name:com.ibm.team.build.engine.variable.substitution---value:
name:teami.scm.buildProjects---value:TEAM_A;;TEAM_B
name:teami.scm.projectLoadDirectory---value:TEAM_A=pgkhs;;TEAM_B=AA
name:teami.scm.projectBuildOrder---value:TEAM_A;;TEAM_B
name:teami.scm.projectTargetDirectory---value:TEAM_A=pgkhs#obj;;TEAM_B=BB
name:teami.scm.baseLibraries---value:
name:teami.scm.loadLatest---value:true
name:teami.scm.loadSnapshot---value:false
name:teami.scm.loadAll---value:false

0 votes

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

Question asked: May 28 '12, 7:58 a.m.

Question was seen: 5,735 times

Last updated: May 28 '12, 7:58 a.m.

Confirmation Cancel Confirm