Gates enable you to deploy component versions or snapshots based on specified statuses. To ensure that only the versions or snapshots with designated statuses are processed, add gate conditions.
Before setting gate conditions, prepare the statuses:
- Create version and snapshot statuses you want to use in conditions. For details, see Define and use statuses.
Set the status for the element to which you want to apply the gate condition.
To set the status of a component version, see Add statuses to component versions.
To set the status of a snapshot, see Add statuses to snapshots.
Create gate conditions
You can define gates for each environment associated with the application, and each environment can have one set of gate conditions.
Example: You could set a gate condition that allows deploying a component version to a Production environment only if the status indicates that the version was successfully deployed and tested in the UAT environment.
To create gate conditions:
- Navigate to Management > Applications and select your application.
- Select the Environments tab, click the name of your environment, and select View Details from the menu. The environment's page opens.
- Select the Gates tab.
Click Edit. The Edit Gates dialog box opens.
To set a condition, select a status from the list.
Only versions or snapshots with this status are processed.
Note: The selection list includes both version and snapshot statuses. You can set both AND and OR conditions.
(Optional) Set additional conditions:
The AND conditions
Click Add Condition and select another status from the list.
This option adds another status to the condition that must be satisfied. For example, selecting Passed Tests AND Latest means that only component versions with both statuses, Passed Tests and Latest, satisfy the condition and can be deployed into the environment.
You can add multiple AND conditions to a single condition group.
The OR conditions Click Add Condition Group to create another condition group.
Additional conditions are defined in the same way as the first condition. A gate with two or more condition groups means that the component is deployed if it meets the conditions of any group. For example, selecting Passed Tests OR Latest means that the component with either status, or both, passes the gate.
You can add any number of conditions to a single gate.
- (Optional) To delete a condition, click the Remove Condition icon next to the condition.
- Click Save.
After running the deployment, view the statuses of the component versions and snapshots in the deployment results. For details, see Analyze deployments.