RTC API for build definition
6 answers
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.
- 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.
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?
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
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