The task is used to create a build definition in the Jazz™ repository. If the specified build definition already exists, it will be updated with the build property values specified. There are over 20 supported build definition types each with its own unique characteristics. Each build type supports a predetermined set of configuration element properties and team build properties. When creating a build, you must ensure to include only those configuration element and team build properties that are supported by the build. Refer to the Build Definition Reference to determine which elements are valid for the build you are defining.
The task supports Team Build Attributes, Build Extensions Debugging Attributes, Build Extensions General Attributes, as well as, its own task specific attributes. Click on a link for more information on the common attributes.
The following table describes the task specific attributes for the task:
| Task Specific Attributes | ||
| Attribute | Description | Required |
| buildDescription | The description for the build that is to be created. | Yes |
| buildFolder |
The build folder path for the build that is to be created. Specify a build folder in the form: /parentFolder/folderName. If the specified build folder is not found when the build is created, it will be created.
|
No |
| buildId | The ID for the build that is to be created. | Yes |
| buildWorkspace | The name of a workspace to use as a reference for streams, components, projects and files used by the build and included in the build definition. This does not have to be the workspace that is used by the build, but it can be. It must be a workspace that is attached to the same streams, components, projects, and files used by the build. This workspace is used as a prototype for any workspace that is created by the task for build properties (see: createWorkspace for more information on workspaces created for build properties). It is also used to locate streams, components, projects, and files referenced by build properties. Note: This workspace must exist prior to running the task. | Yes |
| commaSeparated |
This option controls how list items for build properties are specified. Valid values are: true and false. If true, any build property that can be specified as a list must have items separated by commas. If false, list items must be separated by a space. The default is true.
|
No |
| createReport |
This option controls whether or not a build definition report is generated. Valid values are: true and false. If true, a build definition report is generated. If false, no report is generated. If other report attributes are specified and createReport is set to false, no report is generated and the other report attributes are ignored. The default is true.
|
No |
| createWorkspace |
This option controls whether or not a workspace is created when referenced by a build property, but not found. Valid values are: true and false. If true, and a non-existing workspace is referenced by a build property, the workspace is created by the task using the buildWorkspace workspace as a template. If false, and a non-existing workspace is referenced by a build property, the build fails. The default is true.
|
No |
| ignoreWarnings |
Specify true to set the "Ignore Warnings when computing overall status" option. When ignoreWarnings is set to true, build warnings are ignored and IBM Engineering Workflow Management will show the build as "Passed" until a build failure is encountered. Valid values are: true and false. The default is false.
|
No |
| processAreaName |
The name of the EWM process area where the build is defined.
Note: When the process area is a child of a parent process area, like a team area, specify the processAreaName in path format starting with the project area name. For example: |
Yes |
| processAreaNameDefinitions |
The name of the EWM process area where Enterprise Extensions resource definitions used by this build are defined. If not specified, the EWM process area identified by the processAreaName attribute is used.
Note: When the process area is a child of a parent process area, like a team area, specify the processAreaName in path format starting with the project area name. For example: |
No |
| propertyCopy |
This option controls whether or not the property copy process is enabled. Valid values are: true and false. If true, all buildPropertyCopy elements will be processed and new Ant properties will be created for those build properties specified by the buildPropertyCopy elements. See the buildPropertyCopy Element section for more information. The default is false.
|
No |
| pruning |
This option controls whether or not build pruning is enabled. Valid values are: true and false. If true, the build pruning policy is enabled. Pruning periodically deletes build results that are no longer needed. The default is false.
|
No |
| pruningFailed | Specify the number of failed builds to keep before pruning takes effect. Pruning periodically deletes build results that are no longer needed. Specify the number of failed build results to keep. Older build results are deleted first. The default is 10. | No |
| pruningSuccessful | Specify the number of successful builds to keep before pruning takes effect. Pruning periodically deletes build results that are no longer needed. Specify the number of successful build results to keep. Older build results are deleted first. The default is 10. | No |
| reportAppend |
This option controls whether the build definition report is appended to, or overwrites, the specified report file. Valid values are: true and false. If true, the build definition report will be appended to the specified report file. If false, the build definition report will overwrite (replace) the specified report file. The default is false.
|
No |
| reportCondensed |
This option controls the format of build properties written to the build definition report. Valid values are: true and false. If true, each build property will be reported on a single line, displaying only the name and value of the property. If false, each build property will be reported on multiple lines, displaying each attribute of the build property on a line. The default is false.
|
No |
| reportFile | The name of the report file. If a reportFile is specified, the build definition report will be written to the file. If omitted, the build definition report will be written to the build log. | No |
| reportFolder | The name of the report file folder. This is the location for the report file. A fully qualified path is required. | No |
| reportNoUuid |
This option controls whether or not UUID values are printed. Valid values are: true and false. If true, UUID values are printed x-ed out. If false, UUID values are printed as strings. The default is false.
|
No |
| reportOnly |
Specify true to have only create a build report. This option has been superseded by the reportBuildDefinition task and is kept for compatibility purposes only. Valid values are: true and false. The default is false.
|
No |
| reportSorted |
This option controls whether or not build properties are reported in sorted order in the build definition report. Valid values are: true and false. If true, build properties are reported in sorted name order. If false, build properties are reported in random order. The default is false.
|
No |
| scheduleEnabled |
Specify true to enable build schedules. Valid values are: true and false. The default is false.
|
No |
| templateId | Specify the template ID or template alias for the build that is to be created. See the Build Reference section for more information on build template IDs or template aliases. | Yes |
| updateOnly |
Specify true to limit the update process to updating existing properties and to avoid automatic property clean up actions. Valid values are: true and false. The default is false.
|
No |
Create build definition
<target name="create" description="Create Build Definition">
<xt:createBuildDefinition
repositoryAddress="${repositoryAddress}"
userId="${userId}"
password="${password}"
buildId="Test.djr.Ant.011"
buildDescription="Test.djr.Ant.011.Description"
buildFolder="Test/djr/Ant"
buildWorkspace="Test.djr.Stream.000.Workspace"
ignoreWarnings="true"
processAreaName="${paDJR}"
pruning="true"
pruningFailed="50"
pruningSuccessful="50"
reportCondensed="false"
reportFile="Test.djr.Ant.011.txt"
reportFolder="C:\Users\djreilly\Downloads"
reportNoUuid="true"
reportOnly="false"
reportSorted="true"
scheduleEnabled="false"
templateId="com.ibm.team.build.ant"
>
<!-- Build Engines -->
<xt:buildEngineDefine id="NASWJBE00"/>
<!-- Jazz Source Control Properties -->
<xt:teamBuildProperty name="team.scm.acceptBeforeFetch" value="false"/>
<xt:teamBuildProperty name="team.scm.buildOnlyIfChanges" value="false"/>
<xt:teamBuildProperty name="team.scm.createFoldersForComponents" value="false"/>
<xt:teamBuildProperty name="team.scm.deleteDestinationBeforeFetch" value="false"/>
<xt:teamBuildProperty name="team.scm.fetchDestination" value="${dir.wrk}\${initialize.definition.directoryPrefix}.@compile"/>
<xt:teamBuildProperty name="team.scm.workspaceUUID" value="Test.djr.Ant.011.Workspace"/>
<!-- Ant Build Properties -->
<xt:antBuildProperty name="com.ibm.team.build.ant.antArgs" value="${ant.arg} ${ant.com.arguments}"/>
<xt:antBuildProperty name="com.ibm.team.build.ant.antHome" value="${dir.182}"/>
<xt:antBuildProperty name="com.ibm.team.build.ant.buildFile" value="${etc.ant}\InitializationBuildSubmit.xml"/>
<xt:antBuildProperty name="com.ibm.team.build.ant.includeToolkit" value="true"/>
<xt:antBuildProperty name="com.ibm.team.build.ant.javaHome" value="${dir.jdk}"/>
<xt:antBuildProperty name="com.ibm.team.build.ant.javaVMArgs" value="${jvm.arg} ${jvm.com.arguments}"/>
<xt:antBuildProperty name="com.ibm.team.build.ant.propertiesFile" value="${file.buildproperties}"/>
<xt:antBuildProperty name="com.ibm.team.build.ant.targets" value=""/>
<xt:antBuildProperty name="com.ibm.team.build.ant.workingDir" value="${etc.ant}"/>
<!-- UrbanCode Deploy Properties -->
<xt:ucdpBuildProperty name="team.udeploy.abortOnIncompleteActivityEnabled" value="true"/>
<xt:ucdpBuildProperty name="team.udeploy.application" value="application"/>
<xt:ucdpBuildProperty name="team.udeploy.baseDirectory" value="${team.scm.fetchDestination}"/>
<xt:ucdpBuildProperty name="team.udeploy.component" value="component"/>
<xt:ucdpBuildProperty name="team.udeploy.deployEnabled" value="true"/>
<xt:ucdpBuildProperty name="team.udeploy.enabled" value="true"/>
<xt:ucdpBuildProperty name="team.udeploy.environment" value="environment"/>
<xt:ucdpBuildProperty name="team.udeploy.excludeFiles" value="exclude.000"/>
<xt:ucdpBuildProperty name="team.udeploy.includeFiles" value="include.000"/>
<xt:ucdpBuildProperty name="team.udeploy.links" value="links.000"/>
<xt:ucdpBuildProperty name="team.udeploy.password" value="password"/>
<xt:ucdpBuildProperty name="team.udeploy.passwordFile" value=""/>
<xt:ucdpBuildProperty name="team.udeploy.passwordType" value=""/>
<xt:ucdpBuildProperty name="team.udeploy.process" value="process"/>
<xt:ucdpBuildProperty name="team.udeploy.properties" value="property.000"/>
<xt:ucdpBuildProperty name="team.udeploy.serverURI" value="https://localhost:8443/"/>
<xt:ucdpBuildProperty name="team.udeploy.triggerPolicy" value="ALWAYS"/>
<xt:ucdpBuildProperty name="team.udeploy.userName" value="djreilly@us.ibm.com"/>
<xt:ucdpBuildProperty name="team.udeploy.version" value="version"/>
<!-- Jdt Publishing Properties -->
<xt:jdtBuildProperty name="com.ibm.team.build.jdt.publishing.log" value="jdt.log"/>
<!-- JUnit Publishing Properties -->
<xt:jntBuildProperty name="com.ibm.team.build.junit.publishing.log" value="junit.log"/>
<!-- Build Properties -->
<xt:buildProperty name="ant.arg" value="-v" description="Ant invocation arguments" kind="com.ibm.team.build.property.string"/>
<xt:buildProperty name="ims.build.ant.buildId" value="" description="IMS build initialization ID parameter" kind="com.ibm.team.build.property.string"/>
<xt:buildProperty name="jvm.arg" value="" description="JVM invocation arguments" kind="com.ibm.team.build.property.string"/>
</xt:createBuildDefinition>
</target>