delieverChangeSetsToTarget

The deliverChangeSetsToTarget task delivers the specified change sets to the specified target.
The target can be another workspace or a stream. The change sets included in the delivery are identified by a comparison technique to find:
  • the differences between the build workspace and a stream
  • the differences between the current build snapshot and a priro build snapshot
  • the differences between any two before and after snapshots specified by snapshot name
  • the differences between any two before and after snapshots specified by snapshot UUID
A snapshot of the target is taken before delivering the change sets and another is taken after the change sets are delivered. The snapshots contain a baseline for each component included in the target. The names of the before and after snapshots can be specified with the baselineNameBefore and baselineNameAfter attributes. If snapshot names are not specified, they are set as the following by default:
  • ${buildDefinitionId}.${buildLable}.DeliverChangeSetsToTargetTask.BeforeDelivery
  • ${buildDefinitionlId}.${buildLabel}.DeliverChangeSetsToTargetTask.AfterDelivery
where ${buildDefinitionId} and ${buildLabel} are the built-in Jazz Build Engine ant properties containing the build definition id and build label respectively. Comments for the before and after snapshots can also be specified.

The following table describes deliverChangeSetstoTarget 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 using the Jazz™ Build Engine.

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 -createPasswordFile argument. You can only specify one password file. Either password or passwordFile can be provided, but not both.

No

smartCard

Whether to use the connected smart card for authentication (true or false). Requires userId to be set. For more information about smart card authentication, see Connecting to repositories and project areas.

No

failOnError

If true (the default), the task fails if it encounters an error. If false, some errors are ignored and the task is completed.

No

verbose

Specifies more message output. The default is false.

No

baselineCommentAfter

Comment text for the baseline snapshot taken after the delivery. The default is a blank comment.

No

baselineCommentBefore

Comment text for the baseline snapshot taken before the delivery. The default is a blank comment.

No

baselineNameAfter

Name for the baseline snapshot taken after the delivery. The default is a blank comment.

No

baselineNameBefore

Name for the baseline snapshot taken before the delivery. The default is a blank comment.

No

buildResultUUID

The UUID of the build result to update. The value of this attribute is typically ${buildResultUUID} because the property is built-in when using the Jazz Build Engine.

The ${buildResultUUID} property will be automatically retrieved from the ant environment if this attribute is not specified. This attribute is used to calculate the difference between the build workspace and a stream. It is required for personal builds or if none of snapshotBefore/snapshotAfter, snapshotUUID, or snapshotUUIDBefore/snapshotUUIDAfter attributes are specified.

No

personalBuild

The personal build flag, which is set to true for personal builds. The value of the attribute is typically ${personalBuild} because the property is build-in when using the Jazz Build Engine. The ${personalBuild} property will be automatically retrieved from the ant environment if this attribute is not specified.

No

snapshotAfter

The name of the "after" snapshot to use to calculate the difference between two snapshots. If snapshotBefore is specified, snapshotAfter is required.

No

snapshotBefore

The name of the "before" snapshot to use to calculate the difference between two snapshots. If snapshotBefore is specified, snapshotAfter is required.

No

snapshotUUID

The UUID of the snapshot from a prior build. This snapshot is compared to the current build snapshot, buildResultUUID, to calculate the difference between the snapshots.

No

snapshotUUIDAfter

The UUID of the "after" snapshot to use calculate the difference between two snapshots. If snapthotUUIDBefore is specified, snapshotUUIDAfter is required.

No

snapshotUUIDBefore

The UUID of the "before" snapshot to use to calculate the difference between two snapshots. If snapshotUUIDAfter is specified, snapshotBefore is required.

No

streamName

The name of the stream for workspace comparisons. The stream name is also used when performing a snapshotBefore/snapshotAfter comparison to locate the snapshots.

No

target

The name of the stream or workspace where changes are to be dlivered.

Yes

workspaceUUID

The UUID of the workspace for the build. The value of this attribute is typically ${team.scm.workspaceUUID} because the property is build-in when using the Jazz Build Engine.

Yes

THe following talbe lists the attributes required for each of the four change set specification methods:

Method Attributes Description

Comparison of the build workspace and a stream

streamName

The workspace is compared to the specified stream to determine the differences between them and derive the list of change sets to deliver. This method is only valid for personal builds.

Comparison of the current build snapshot and a prior build snapshot

buildResultUUID

snapshotUUID

The current build snapshot is compared to the prior build snapshot to determine the list of change sets to deliver.

Comparison of any two before and after snapshots specified by snapshot name.

snapshotBefore

snapshotAfter

streamName

The before snapshot is compared to the after snapshot to determine the list of change sets to deliver. The stream name is required to find the snapshots by name.

Comparison of any two before and after snapshots specified by snapshot UUID

snapshotUUIDBefore

snapshotUUIDAfter

The before snapshot is compared to the after snapshot to determine the list of change sets to deliver. The stream name is required to find the snapshots by name.

Note:
  • For all comparison methods, at least one change set must be found for the delivery process to continue.
  • Any value specified for snapshotBefore must identify a valid and unique snapshot.
  • Any value specified for snapshotAfter must identify a valid and unique snapshot.
  • Any value specified for streamName must identify a valid and unique stream.
  • Any value specified for target must identify a valid and unique stream or workspace.
  • All deliver preconditions must be satisfied for a delivery to be successful:
    • The client is logged into the repository.
    • The sync report is current. For example, the remote workspace is unchanged since the sync report was obtained, the local workspace is the current workspace, and the given baseline and change sets appear among the outgoing ones listed in the sync report.
    • The target workspace must not contain active change sets.
    • The change set can be delivered without creating unresolved conflicts or gaps in the target workspace.
    • The components for which the change sets are siloed under contain no conflicet in the current workspace.

Example

Deliver APAR change sets

<target name="main" description="${lblMainPackageChild)}">
	<BuildActivityStartChild label="${lblMainPackageChild}" parent="${mainParentId}"/>
	<BuildActivity label="${lblMainPackageChild}"/>

	<!-- Set delivery properties -->
	<tstamp>
		<format property="snapshot.time" pattern="yyyyMMdd.HHmmssSSS"/>
	</tstamp>

	<property name="snapshot1" value="${release.lcl}.${ims.build.ant.aparName}.Endapar.${snapshot.time}"/>
	<property name="snapshot2" value=$"{release.lcl}.${ims.build.ant.aparName}.Promote.${snapshot.time}"/>
	<property name="comments1" value="Before baseline for ${ims.build.ant.aparName} ${release.lcl} delivery"/>
	<property name="comments2" value="After basedline for ${ims.build.ant.aparName} ${release.lcl} delivery"/>

	<!-- Deliver APAR changesets -->
	<BuildActivity label="${lblMainPackageChild}: Deliver APAR changesets"/>
	<im:deliverchangesetstotarget
		repositoryAddress="${repositoryAddress}"
		userId="$userId}"
		passwordFile="${passwordFile}"
		baselineCommentAfter="${comments2}"
		baselineCommentBeofre="${comments1}"
		baselineNameAfter="${snapshot2}"
		baselineNameBefore="${snapshot1}"
		buildResultUUID="${buildResultUUID}"
		snapshotAfter="${snapshotAfter}"
		snapshotBefore="${snapshotBefore}"
		streamName="${ims.build.ant.streamName}"
		target="${release.lcl}"
		workspaceUUID="${team.enterprise.scm.workspaceUUID}"
	/>
</target>

video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki