exportBuildDefinition
The exportBuildDefinition task exports build definitions from an EWM repository into an executable Ant build script as a createBuildDefinition or updateBuidlDefinition task embedded in a Build.Definitions target.
The exportBuildDfinition task can be used to export a single build definition, or a series of build definitions, into a fully formatted Ant build script. The generated build script can be used for build definition recovery, backup, and restore of the build definition, moving the build definition to another repository, and/or ongoing maintenance of the build definition.
The following table describes exportBuildDefinition attributes.
Attribute | Description | Required |
---|---|---|
repositoryAddress |
Address of the team repository to use. The value of this attribute is typically ${repositoryAddress} because that property is built-in when the Jazz® Build Engine is used. |
Yes |
userId |
User ID for authentication to the repository. Requires password or passwordFile to be set. |
Yes |
certificateFile |
The path to the file that contains the user's login certificate for authentication. Requires password or passwordFile to be set. You can specify certificateFile or repositoriesFile, but not both. |
No |
password |
Password for the user ID for authentication to the repository. Either password or passwordFile can be provided, but not both. |
No |
passwordFile |
The password file to use for authentication to the connection. You can
create a suitable password file by invoking the Jazz Build
Engine with the |
No |
smartCard |
Use of the connected smart card for authentication ( |
No |
failOnError |
If |
No |
verbose |
More message output. The default value is |
No |
buildId |
The ID for the build that is to be created. |
Yes |
buildWorkspace |
The name of the 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 the prototype for any workspace defined to the build that is created by the creatBuildDefinition task. |
Yes |
commaSeparated |
This option controls how list items for build properties are specified.
Valid values are |
No |
createReport |
This option controls whether or not a build definition report is
generated. Valid values are |
No |
exportAsis |
Specify |
No |
exportCreate |
Specify |
No |
exportFile |
The name of the export file. This is the file where the Ant script with exported build definition is written. Since the export file is also an Ant build script, the file extension typically used for this file is "xml". |
Yes |
exportFolder |
The name of the export file folder. This is the location for the export file. A fully qualified path is required. |
Yes |
exportFormat |
This option controls whether or not the resulting export file, and
the XML it contains, is formatted for human consumption. Specify |
No |
exportInternal |
This option controls whether or not internal properties are
exported. Valide values are |
No |
exportLog |
This option controls whether the resulting export file is written to the
console as well as the file. Specify |
No |
exportReportAppend |
This option controls the contents of the reportAppend attribute on
the exported createBuildDefinition or updateBuildDefinition task. Specify
|
No |
exportReportCondensed |
This option controls the contents of the reportCondensed attribute
on the exported createBuildDefinition or updateBuildDefinition task. Specify
|
No |
exportReportFile |
This option controls the contents of the reportFile adttribute on the exported createBuildDefinition or updateBuildDefinition task. Specify a file_name to have the reportFile="file_name"attribute added to the task. If this attribute is omitted, the reportFolder attribute will be omitted from the task in the export. |
No |
exportReportFolder |
This option controls the contents of the reportFolder attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify a folder_path to have the reportFolder="folder_path" attribute added to the task. If this attribute is omitted, the reportFolder attribute will be omitted from the task in the export. |
No |
exportReportNoUuid |
This option controls the contents of the reportNoUuid attribute
on the exported createBuildDefinition or updateBuildDefinition task. Specify
|
No |
exportReportOnly |
This option controls the contents of the reportONly attribute on
the exported createBuildDefinition task. Specify |
No |
exportReportSorted |
This option controls the contents of the reportSorted attribute
on the exported createBuildDefinition or updateBuildDefinition task. Specify
|
No |
processAreaName |
The name of the EWM process area where the builds are defined. When the process area is a child of a parent process area,
like a team area, specify the process area name in a path format starting with the project area name
( /project_area_name/team_area_name/subteam_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. Nevertheless, if the process area is a team area, the EWM process area must be explicitly identified to define where the Enterprise Extensions system definitions are. |
No |
reportAppend |
This option controls whether the build definition report is appended
to or overwrites the specified report file. Valid values are |
No |
reportCondensed |
Thihs option controls the format of build properties written to
the build definition report. Valid values are |
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 |
No |
reportSorted |
This option controls whether or not build properties are reported in
sorted order in the build definition report. Valid values are |
No |
Build Definition Elements
One or more buildDefinition elements can be specified within the exportBuildDefinition element. Build definition elements are used to identify a series of build definitions to export. Both the builId attribute and buildDefinition elements can be specified. At lease one buildDefinition element or the buildId attribute is required.
The following table describes the valid buildDefinition element attributes.
Attribute | Description | Required |
---|---|---|
buildId |
The ID for the build that is to be created. |
Yes |
buildWorkspace |
The name of the 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 the prototype for any workspace defined to the build that is created by the creatBuildDefinition task. |
No |
exportReportAppend |
This option controls the contents of the reportAppend attribute on
the exported createBuildDefinition or updateBuildDefinition task. Specify
|
No |
exportReportCondensed |
This option controls the contents of the reportCondensed attribute
on the exported createBuildDefinition or updateBuildDefinition task. Specify
|
No |
exportReportFile |
This option controls the contents of the reportFile adttribute on the exported createBuildDefinition or updateBuildDefinition task. Specify a file_name to have the reportFile="file_name"attribute added to the task. If this attribute is omitted, the reportFolder attribute will be omitted from the task in the export. |
No |
exportReportFolder |
This option controls the contents of the reportFolder attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify a folder_path to have the reportFolder="folder_path" attribute added to the task. If this attribute is omitted, the reportFolder attribute will be omitted from the task in the export. |
No |
exportReportNoUuid |
This option controls the contents of the reportNoUuid attribute
on the exported createBuildDefinition or updateBuildDefinition task. Specify
|
No |
exportReportOnly |
This option controls the contents of the reportONly attribute on
the exported createBuildDefinition task. Specify |
No |
exportReportSorted |
This option controls the contents of the reportSorted attribute
on the exported createBuildDefinition or updateBuildDefinition task. Specify
|
No |
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. Nevertheless, if the process area is a team area, the EWM process area must be explicitly identified to define where the Enterprise Extensions system definitions are. |
No |
reportAppend |
This option controls whether the build definition report is appended
to or overwrites the specified report file. Valid values are |
No |
reportCondensed |
Thihs option controls the format of build properties written to
the build definition report. Valid values are |
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 |
No |
reportSorted |
This option controls whether or not build properties are reported in
sorted order in the build definition report. Valid values are |
No |
- If any one of the exportReportAppend, exportReportCondensed, exportReportFile, exportReportFolder, exportReportNoUuid, exporeReportSorted, or exportReportOnly attributes are specified on the exportBuildDefinition element, the value for the attribute will be used for all exported builds.
- If any one of the exportReportAppend, exportReportCondensed, exportReportFile, exportReportFolder, exportReportNoUuid, exportReport Sorted, or exportReportOnly attributes are specified on the exportBuildDefinition element, the value for the attribute can be overridden by a similar attribute on a buildDefinition element.
- If any one of the exportReportAppend, exportReportCondensed, exportReportFile, exportReportFolder, exportReportNoUuid, exportReportSorted, or exportReportOnly attributes are specified on the exportuildDefinition element and overridden by a similar attribute on a buildDefinition element, the value for the attribute will revert back to the value specified on the exportBuildDefinition element for subsequent buildDefinition elements unless overridden on the subsequent buildDefinition elements.
- If the processAreaNameDefinitions attribute is specified on the exportBuildDefinittion element, the value for the attribute will be used for all exported builds.
- If the processAreaNameDefinitions attribute is specified on the exportBuildDefinition element, the value for the attribute can be overridden by a similar attribute on a buildDefinition element.
- If the processAreaNameDefinitions attribute is specified on the exportBuildDefinition element and overridden by a similar attribute on a buildDefinition element, the value for the attribute will revert back to the value specified on the exportBuildDefinition element for subsequent builDefinition elements unless overridden on the subsequent buildDefinition elements.
- The value for the buildWorkspace attribute specified on the exportBuildDefinition element will be used for all exported builds.
- The value for the buildWorkspace attribute specified on the exportBuildDefinition element can be overridden by a smiliar attribute on a buildDefinition element.
- The value for the buildWorkspace attribute specified on the exportBuildDefinition element and overridden by a similar attribute on abuildDefinition element will revert back to the value specified on the exportBuildDefinition element for subsequent buildDefinition elements unless overridden on the subsequent buildDefinition elements.
- When creating or maintaining a series of similar builds, define a single
prototype workspace for the builds and specify that workspace for the
buildWorkspace attribute. If the createWorkspace attribute is set to
true
, any unique workspaces required by a build, and not found ind the repository will be automatically created by the createBuildDefinition task using the prototype workspace as a model when the build definition is created. This feature can be used to avoid the overhead of manually creating individual workspaces for a series of builds.
Examples
Export build definitions:
<target name="test" description="Export Build Definition">
<xt:exportbuilddefinition
repositoryAddress="${repositoryAddress}"
userId="${userId}"
password="${password}"
buildId="Test.djr.Dpnd.013"
buildWorkspace="Test.djr.Stream.000.Workspace"
processAreaName="${paDJR}"
processAreaNameDefinitions="Liams PA"
exportFile="BuildDefinition.000.xml"
exportFolder="C:\Users\djreilly\Downloads"
exportFormat="true"
exportLog="true"
exportReportCondensed="true"
exportReportFile="Test.djr.Dpnd.013.txt"
exportReportFolder="C:\Users\djreilly\Downloads"
exportReportSorted="true">
</xt:exportbuilddefinition>
<xt:exportbuilddefinition
repositoryAddress="${repositoryAddress}"
userId="${userId}"
password="${password}"
buildId="Test.djr.Dpnd.013"
buildWorkspace="Test.djr.Stream.000.Workspace"
processAreaName="${paDJR}"
processAreaNameDefinitions="Liams PA"
exportFile="BuildDefinition.001.xml"
exportFolder="C:\Users\djreilly\Downloads"
exportFormat="true"
exportLog="true"
exportReportCondensed="true"
exportReportFile="Test.djr.Dpnd.013.txt"
exportReportFolder="C:\Users\djreilly\Downloads"
exportReportSorted="true">
<xt:buildDefinition buildId="Test.djr.Dpnd.000" processAreaNameDefinitions="${paDJR}" exportReportFile="Test.djr.Dpnd.000.txt"/>
<xt:buildDefinition buildId="Test.djr.Dpnd.001" processAreaNameDefinitions="${paDJR}" exportReportFile="Test.djr.Dpnd.001.txt"/>
<xt:buildDefinition buildId="Test.djr.Dpnd.010" processAreaNameDefinitions="${paDJR}" exportReportFile="Test.djr.Dpnd.010.txt"/>
<xt:buildDefinition buildId="Test.djr.Dpnd.011" processAreaNameDefinitions="${paDJR}" exportReportFile="Test.djr.Dpnd.011.txt"/>
<xt:buildDefinition buildId="Test.djr.Dpnd.012" exportReportFile="Test.djr.Dpnd.012.txt"/>
</xt:exportbuilddefinition>
</target>