Skip to content

Latest commit

 

History

History
129 lines (82 loc) · 5.28 KB

triggers.md

File metadata and controls

129 lines (82 loc) · 5.28 KB
title description ms.assetid ms.topic ms.author author ms.custom ms.date monikerRange
Classic release triggers for stages, branches, and pipelines
DevOps CI CD - Understand triggers in Azure Pipelines
FDB5DA41-1ADA-485E-86BD-8BF147788568
tutorial
ronai
RoopeshNair
seodec18, contperf-fy21q1
09/25/2020
>= tfs-2015

Release triggers

[!INCLUDE version-tfs-2015-rtm]

::: moniker range="<= tfs-2018" [!INCLUDE temp] ::: moniker-end

::: moniker range="azure-devops"

Note

This topic covers classic release pipelines. To understand triggers in YAML pipelines, see pipeline triggers. ::: moniker-end

Release triggers are an automation tool to deploy your application. When the trigger conditions are met, the pipeline will deploy your artifacts to the environment/stages you already specified.

Continuous deployment triggers

Continuous deployment triggers allow you to create a release every time a new build artifact is available. This feature is currently available only to build from Azure DevOps, TFS and Git-based repositories.

[!div class="mx-imgBorder"] Selecting a trigger for a release

Build branch filters allow you to trigger a release only for a build that is from one of the branches selected here.

You also have the option to specify branch tags. If you do so, a release will be triggered only if a new build tagged with the keywords specified here, is available.

Note

Automatically creating a release does not mean it will be automatically deployed to a stage. You must set up stages triggers to deploy your app to the various stages.

Scheduled release triggers

Scheduled release trigger allow you to create new releases at specific times.

Select the schedule icon under the Artifacts section. Toggle the Enabled/Disabled button and specify your release schedule. You can set up multiple schedules to trigger a release.

[!div class="mx-imgBorder"] Defining schedules to trigger releases

::: moniker range="> tfs-2018"

Pull request triggers

If you chose to enable the pull-request triggers, a release will be created every time a selected artifact is available as part of a pull request workflow.

[!div class="mx-imgBorder"] Configure a pull request trigger.

To use a pull request trigger, you must also enable it for specific stages. We will go through stage triggers in the next section. You may also want to set up a branch policies for your branches.

::: moniker-end

Stage triggers

Stage triggers allow you set up specific conditions to trigger deployment to a specific stage.

[!div class="mx-imgBorder"] The stage trigger conditions settings

  • Select trigger: Set the trigger that will start the deployment to this stage automatically. Select "Release" to deploy to the stage every time a new release is created. Use the "Stage" option to deploy after deployments to selected stages are successful. To allow only manual deployments, select "Manual".

  • Artifacts filter: Select artifact condition(s) to trigger a new deployment. A release will be deployed to this stage only if all artifact conditions are met.

    [!div class="mx-imgBorder"] The artifact filter trigger conditions settings

  • Schedule: Trigger a new deployment to this stage at a specific time.

    [!div class="mx-imgBorder"] The scheduled trigger conditions settings

  • Pull-request deployment: Enabling this will allow pull request based releases to be deployed to this stage. Keep it disabled if this is a critical or production stage.

    [!div class="mx-imgBorder"] The pull request trigger conditions settings

  • Pre-deployment approvals: Select the users who can approve or reject deployments to this stage. By default, all users must approve the deployment. If a group is added, one user in the group must approve the deployment. You can also specify the timeout (the maximum time that an approval is allowed to be pending before it is automatically rejected) and approval policies.

    [!div class="mx-imgBorder"] Pre-deployment approvals

  • Gates: Allow you to set up specific gates to evaluate before the deployment.

    [!div class="mx-imgBorder"] Gates set up

  • Deployment queue settings: Allow you to configure actions when multiple releases are queued for deployment.

    [!div class="mx-imgBorder"] deployment queue settings

::: moniker range="tfs-2015"

Note

TFS 2015: The following features are not available in TFS 2015 - continuous deployment triggers for multiple artifact sources, multiple scheduled triggers combining scheduled and continuous deployment triggers in the same pipeline, continuous deployment based on the branch or tag of a build.

::: moniker-end

[!INCLUDE rm-help-support-shared]