The macro is used to deliver changes from a source workspace or stream (default is current repository workspace) to a target workspace or stream (default is current target of source workspace). The changes to deliver can be scoped in one of five ways: all changes in a workspace (default), all changes in a set of one or more baselines (using --baselines), all changes in a set of one of more components (using -C/--components), all changes in a set of one or more work items (using --workitems), or a specific set of changes (by specifying the change set aliases or UUIDs using -c/--changes).
The macro supports the SCM Macro Common Attributes, as well as, its own macro specific attributes. Click on the link for more information on the common attributes.
The following table describes the macro specific attributes for the macro:
| Macro Specific Attributes | ||
| Attribute | Description | Required |
| baselines | Indicates that the selectors refer to baselines and all of the changes in the given baselines must be delivered. To specify a baseline, use its alias or UUID[@repo] in the list of selectors. | No* |
| changes | Indicates that the selectors refer to change sets and only the specified change sets must be delivered. To specify a change set, use its alias or UUID[@repo] in the list of selectors. | No* |
| components | Indicates that the selectors refer to components and all of the outgoing changes in the given components will be delivered. To specify a component, use its name, alias, or UUID in the list of selectors. | No* |
| source | Name of the source workspace or stream. | Yes |
| target | Name of the target workspace or stream. | Yes |
| workitems | Indicates that the selectors refer to work items and all the change sets in the specified work items must be delivered. To specify a work item, use its ID[@repo] in the list of selectors. | No* |
The macro accepts both 0 and 53 as successful return codes. The SCM subcommand return code 53 indicates that a deliver succeeded, but there were no outgoing changes, so the target remains unchanged.
This macro specifies the following options on the SCM command:
--baselines <selectors>
--changes <selectors>
--components <selectors>
--directory <arg>
--no-local-refresh
--source <arg>
--target <arg>
--workitems <selectors>
The following options can be added to the command using the additionalArgs element:
--all
--component-hierarchy
--exclude-component-changes
--harmonize-history
--ignore-uncommitted
--include-component-changes
--json
--multiple-hierarchies
--overwrite-incoming-replace
--quiet
--release-locks <arg>
--skip-incoming-replace
--verbose
Additional selectors should be argAnt argadditionalArgs element. For example:
< ... components="componentName0">
<additionalArgs>
<arg value="componentName1"/>
<arg value="componentName2"/>
<arg value="--verbose"/>
</additionalArgs>
</>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed Materials - Property of IBM
(c) Copyright IBM Corporation 2020. All Rights Reserved.
Note to U.S. Government Users Restricted Rights:
Use, duplication or disclosure restricted by GSA ADP Schedule
Contract with IBM Corp.
-->
<project
basedir="."
default="all"
name="Example"
xmlns:xt="antlib:com.ibm.team.build.extensions.toolkit">
<description>Example</description>
<!-- Load build extensions -->
<xt:loadBuildExtensions/>
<xt:getJarLocation property="jarPath"/>
<!-- Load common resources -->
<import>
<javaresource name="scripts/smpe/imports/$common.xml">
<classpath location="${jarPath}"/>
</javaresource>
</import>
<import>
<javaresource name="scripts/smpe/imports/$scmcmd.xml">
<classpath location="${jarPath}"/>
</javaresource>
</import>
<xt:setPassword password="${password}" property="passwd"/>
<property name="userId" value="ADMIN"/>
<property name="conf" value="/var/MacroTestingScm/.jazz-scm"/>
<property name="root" value="/var/MacroTestingScm/root"/>
<property name="scmd" value="/var/MacroTestingScm/zips/scmtools/eclipse"/>
<!-- - - - - - - - - - - - - - - - - - - *
* Example *
*- - - - - - - - - - - - - - - - - - - -->
<target name="main" description="main">
<!-- Scm -->
<ScmProperties
authenticate="Password"
repository="repositoryAddress"
password="passwd"
userid="userId"
cfg="conf"
dir="root"
scm="scmd"
/>
<!-- Load -->
<ScmLoadWorkspace workspace="${workspace}"/>
<!-- Snapshot -->
<ScmCreateSnapshot name=""my new snapshot"" workspace="${workspace}"/>
<!-- Deliver -->
<ScmDeliver source="${workspace}" target="${stream}"/>
</target>
<target depends="main" description="all" name="all"/>
</project>