title | description | ms.topic | ms.author | author | ms.date | monikerRange |
---|---|---|---|---|---|---|
Configure build completion triggers (classic) |
Configure build completion triggers (classic) |
conceptual |
sdanie |
steved0x |
01/25/2023 |
>=azure-devops-2019 |
[!INCLUDE version-gt-eq-2019]
[!div class="op_single_selector"]
Large products have several components that are dependent on each other. These components are often independently built. When an upstream component (a library, for example) changes, the downstream dependencies have to be rebuilt and revalidated.
In situations like these, add a pipeline trigger to run your pipeline upon the successful completion of the triggering pipeline.
In the classic editor, pipeline triggers are called build completion triggers. You can select any other build in the same project to be the triggering pipeline.
After you add a build completion trigger, select the triggering build. If the triggering build is sourced from a Git repo, you can also specify branch filters. If you want to use wildcard characters, then type the branch specification (for example, features/modules/*
) and then press Enter.
Note
Keep in mind that in some cases, a single multi-job build could meet your needs. However, a build completion trigger is useful if your requirements include different configuration settings, options, or a different team to own the dependent pipeline.
In many cases, you'll want to download artifacts from the triggering build. To do this:
-
Edit your build pipeline.
-
Add the Download Build Artifacts task to one of your jobs under Tasks.
-
For Download artifacts produced by, select Specific build.
-
Select the team Project that contains the triggering build pipeline.
-
Select the triggering Build pipeline.
-
Select When appropriate, download artifacts from the triggering build.
-
Even though you specified that you want to download artifacts from the triggering build, you must still select a value for Build. The option you choose here determines which build will be the source of the artifacts whenever your triggered build is run because of any other reason than
BuildCompletion
(e.g.Manual
,IndividualCI
,Schedule
, and so on). -
Specify the Artifact name and make sure it matches the name of the artifact published by the triggering build.
-
Specify the Destination directory to which you want to download the artifacts. For example:
$(Build.BinariesDirectory)
:::image type="content" source="media/build-trigger-download-artifact.png" alt-text="A screenshot displaying how to download artifacts from a triggering build in a Classic pipeline.":::
- Download artifacts produced by: Specific build.
- Project: select your project from the dropdown menu.
- Build pipeline: select your pipeline from the dropdown menu.
- Check When appropriate, download artifacts from the triggering build.
- Build version to download: select a build version.
- Download type: Specific artifact.
- Artifact name: select your artifact from the dropdown menu.
- Destination directory: path on the agent machine where the artifacts will be downloaded.