It's all about the answers!

Ask a question

RTC API for build definition


Jia Jia Li (8058157192) | asked May 28 '12, 7:58 a.m.
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!

6 answers



permanent link
sam detweiler (12.5k6195201) | answered May 28 '12, 8:43 a.m.
did u look at the build system toolkit? different than the SDK

permanent link
Jia Jia Li (8058157192) | answered May 28 '12, 10:40 a.m.
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!

permanent link
Ralph Schoon (63.7k33648) | answered May 29 '12, 2:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Jia,

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

permanent link
Jia Jia Li (8058157192) | answered May 30 '12, 2:14 a.m.
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!

permanent link
Ralph Schoon (63.7k33648) | answered May 30 '12, 4:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.

permanent link
Jia Jia Li (8058157192) | answered May 30 '12, 9:28 a.m.
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

Your answer


Register or 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.