resources.pipelines.pipeline.trigger definition

Specify none to disable, true to include all branches, or use the full syntax as described in the following examples.

Definitions that reference this definition: resources.pipelines.pipeline

Implementations

Implementation Description
trigger: enabled, branches, stages, tags Configure pipeline resource triggers using the full syntax.
trigger: none | true Specify none to disable or true to include all branches.
Implementation Description
trigger: enabled, branches Specify none to disable, true to include all branches, or use the full syntax as described in the following examples.
trigger: none | true Specify none to disable or true to include all branches.

Remarks

There are several ways to define triggers in a pipeline resource. To trigger a run when any run of the referenced pipeline completes, use trigger: true.

resources:
  pipelines:
  - pipeline: source-pipeline
    source: TriggeringPipeline
    trigger: true

To disable the pipeline resource trigger, specify a value of none.

resources:
  pipelines:
  - pipeline: source-pipeline
    source: TriggeringPipeline
    trigger: none

To configure branch filters, use the full syntax. Branch filters can be specified as a list of branches to include, or as a list of branches to include combined with a list of branches to exclude.

To specify a list of branches to include and exclude, use the following trigger syntax.

resources:
  pipelines:
  - pipeline: source-pipeline
    source: TriggeringPipeline
    trigger:
      branches:
        include:
        - main
        - develop
        - features/*
        exclude:
        - features/experimental/*

To specify a list of branches to include, with no excludes, omit the exclude value, or use the following syntax to specify the list of branches to include directly following branches.

resources:
  pipelines:
  - pipeline: source-pipeline
    source: TriggeringPipeline
    trigger:
      branches:
      - main
      - develop

To filter by stages or tags, use the following trigger syntax.

resources:
  pipelines:
  - pipeline: source-pipeline
    source: TriggeringPipeline
    trigger:
      branches: # Branches to include
      tags: # List of tags that when matched will trigger the pipeline. 
      - release25
      stages: # List of stages that when complete will trigger the pipeline. 
      - build

For more information, see Pipeline completion triggers.

Important

When you define a resource trigger, if its pipeline resource is from the same repo as the current pipeline, triggering follows the same branch and commit on which the event is raised. But if the pipeline resource is from a different repo, the current pipeline is triggered on the branch specified by the Default branch for manual and scheduled builds setting. For more information, see Branch considerations for pipeline completion triggers.

trigger: enabled, branches, stages, tags

Configure pipeline resource triggers using the full syntax.

trigger:
  enabled: boolean # Whether the trigger is enabled; defaults to true.
  branches: branches # Branches to include or exclude for triggering a run.
  stages: [ string ] # List of stages that when matched will trigger the pipeline.
  tags: [ string ] # List of tags that when matched will trigger the pipeline.

Properties

enabled boolean.
Whether the trigger is enabled; defaults to true.

branches resources.pipelines.pipeline.trigger.branches.
Branch names to include or exclude for triggering a run.

stages string list.
List of stages that when matched will trigger the pipeline.

tags string list.
List of tags that when matched will trigger the pipeline.

trigger: enabled, branches

Specify none to disable, true to include all branches, or use the full syntax as described in the following examples.

trigger:
  enabled: boolean # Whether the trigger is enabled; defaults to true.
  branches: branches # Branches to include or exclude for triggering a run.

Properties

enabled boolean.
Whether the trigger is enabled; defaults to true.

branches resources.pipelines.pipeline.trigger.branches.
Branch names to include or exclude for triggering a run.

trigger: none | true

Specify none to disable or true to include all branches.

trigger: none | true # Specify none to disable or true to include all branches.

trigger string. Allowed values: none | true.

Specify none to disable or true to include all branches.