Wait Dependencies

3 minute readDeveloper productivity

Enterprise releases are made up of loosely and tightly coupled pieces. A single project may be comprised of separate application and product pipelines, developed independent of one another. These separate pipelines of the project ultimately need to converge in order to push out the full release.

There may also be dependencies across components developed by different teams. The project may branch to different pipelines to deploy each component, but there will be different wait points to ensure that dependencies are met, and to ensure sub pipelines are completed before the release can continue.

You can set pipeline wait dependencies in pipelines through the UI (via either the Pipeline Stage View or the Release Kanban View) or via API commands.

Consider the following scenario for a project comprised of three pipelines:

  • Pipeline A triggers sub-pipeline B in STAGE DEV and, at STAGE PROD, depends on sub-pipeline B completing.

  • Sub-pipeline B triggers sub-pipeline C at its STAGE DEV and, at its STAGE QA, waits for sub-pipeline C to complete before continuing.

  • Pipeline A waits at STAGE PROD for all downstream sub-pipelines to complete before proceeding.

Define a task of type `pipeline ` or `release ` at the various junctures in your pipeline hierarchy where you wish to trigger a sub-pipeline. Then configure the wait dependency behavior across pipeline stage, gate, and task objects.

Configuring Pipeline Wait Dependencies

After your pipeline hierarchy is modeled to include pipeline and release tasks, you can set wait dependencies in pipeline stage, gate, and task objects. Wait dependencies are configured in the same manner across all types of pipeline objects via their Conditions dialog, as follows:

Figure 1. Pipeline wait dependencies
Figure 1. Pipeline wait dependencies

1

For pipeline and release tasks modeled in the current pipeline hierarchy:

Select to Wait for all triggered pipelines, Wait for all triggered releases, or both, downstream from this pipeline in the hierarchy.

2

3

If either Wait for all triggered pipelines or Wait for all triggered releases is selected, enter a list of Users, Groups, Projects, Variables that are authorized to skip the dependency.

4

Select to add a new, adhoc wait dependency to a specific pipeline.

Specify a pipeline for the new dependency:

5

Select the project and pipeline, optionally selecting stage, gate type, and task based on the desired level of granularity for the dependency.

6

7

8

9

10

If Allow user to skip dependency is checked, enter a list of Users, Groups, Projects, Variables that are authorized to skip this dependency.

11

Setting Wait Dependencies

Stages

  • In the stage, click the Stage Conditions button in the top right corner of the stage to open the Conditions dialog box.

  • Follow the steps in Configuring Pipeline Wait Dependencies above.

  • Click OK to save the conditions.

Tasks

Gates

  • Expand the gate in the desired stage by clicking on its Plus Sign button: the list of rules for the entry gate opens:

  • Click the Gate Conditions button for the gate to open the Conditions dialog box.

  • Follow the steps in Configuring Pipeline Wait Dependencies above.

  • Click OK to save your entries.

Configuring Wait Dependencies with API Commands

You can set wait dependencies using the API commands through the ectool command-line interface or through a DSL script on pipeline stages, tasks, and gates. For complete details about the API, refer to Wait dependency.