How to create build definition programmatically?
I want to automate the process of creation of build definition in RTC. |
3 answers
I suggest that you give some more details about your request, but I have a sample that uses Plain Java API.
import com.ibm.team.build.common.BuildItemFactory;
import com.ibm.team.build.common.builddefinition.BuildConfigurationRegistry;
import com.ibm.team.build.common.builddefinition.IBuildDefinitionTemplate;
// create build definition
IBuildDefinition newbuildDef = BuildItemFactory.createBuildDefinition((com.ibm.team.process.common.IProcessArea) projectArea);
Once you have the IBuildDefinition object, you can set its properties using the BuildItemFactory methods.
|
The easiest is to use ANT to create the build definitions.
Here is an example:
<project name="BuildServer"
xmlns:ld="antlib:com.ibm.team.enterprise.zos.systemdefinition.toolkit"
xmlns:xt="antlib:com.ibm.team.build.extensions.toolkit">
.......
<xt:updatebuilddefinition buildworkspace="build.mortgage.test"
repositoryAddress="${repo.url}"
userId="${repo.adminid}"
password="${repo.adminpw}"
buildid="mortgage.test"
processareaname="${jke}"
processAreaNameDefinitions="${zproject.name}"
updateOnly="true"
verbose="true"
failOnError="true">
<xt:buildEngineDefine id="zos.my.co" />
</xt:updatebuilddefinition>
........
</project>
|
Justin McGee (11●1)
| answered Aug 26 '21, 1:16 a.m.
edited Aug 27 '21, 2:20 a.m. by Ralph Schoon (63.5k●3●36●46)
|
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.