trigger definition

A push trigger specifies which branches cause a continuous integration build to run.

Properties that use this definition: pipeline.trigger

Properties that use this definition: pipeline.trigger

Properties that use this definition: pipeline.trigger, resources.repositories.repository.trigger

Properties that use this definition: pipeline.trigger, resources.repositories.repository.trigger

Properties that use this definition: pipeline.trigger, resources.repositories.repository.trigger

Properties that use this definition: pipeline.trigger, resources.repositories.repository.trigger

Overloads

Overload Description
trigger: none
trigger: branchFilter list List of branches that trigger a run.
trigger: batch, branches, paths Full syntax for complete control.
Overload Description
trigger: none
trigger: branchFilter list List of branches that trigger a run.
trigger: batch, branches, paths, tags Full syntax for complete control.
Overload Description
trigger: none
trigger: branchFilter list List of branches that trigger a run.
trigger: batch, branches, paths, tags Full syntax for complete control.
Overload Description
trigger: none
trigger: branchFilter list List of branches that trigger a run.
trigger: batch, branches, paths, tags Full syntax for complete control.
Overload Description
trigger: none
trigger: branchFilter list List of branches that trigger a run.
trigger: batch, branches, paths, tags Full syntax for complete control.
Overload Description
trigger: none
trigger: branchFilter list List of branches that trigger a run.
trigger: batch, branches, paths, tags Full syntax for complete control.

Remarks

For more information about using triggers with a specific repository type, see Supported source repositories.

If you specify no push trigger, pushes to any branch trigger a build.

There are three distinct syntax options for the trigger keyword: a list of branches to include, a way to disable CI triggers, and the full syntax for complete control.

If you specify an exclude clause without an include clause for branches, tags, or paths, it is equivalent to specifying * in the include clause.

Important

When you specify a trigger, only branches that you explicitly configure for inclusion trigger a pipeline. Inclusions are processed first, and then exclusions are removed from that list. If you specify an exclusion but no inclusions, nothing triggers.

trigger: none

Disablement syntax.

trigger: none # Disable CI triggers.

Properties

trigger

string

Disable CI triggers. Acceptable values: none

trigger: none # Disable CI triggers.

Properties

trigger

string

Disable CI triggers. Acceptable values: none

trigger: none # Disable CI triggers.

Properties

trigger

string

Disable CI triggers. Acceptable values: none

trigger: none # Disable CI triggers.

Properties

trigger

string

Disable CI triggers. Acceptable values: none

trigger: none # Disable CI triggers.

Properties

trigger

string

Disable CI triggers. Acceptable values: none

trigger: none # Disable CI triggers.

Properties

trigger

string

Disable CI triggers. Acceptable values: none

Examples

trigger: none # will disable CI builds entirely

trigger: branchFilter list

List syntax specifies a list of branches for which a push triggers a run.

trigger: [ branchFilter ] # List of branches that trigger a run. [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*

Properties

trigger

string

Disable CI triggers. Acceptable values: [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*

trigger: [ branchFilter ] # List of branches that trigger a run. [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*

Properties

trigger

string

Disable CI triggers. Acceptable values: [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*

trigger: [ branchFilter ] # List of branches that trigger a run. [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*

Properties

trigger

string

Disable CI triggers. Acceptable values: [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*

trigger: [ branchFilter ] # List of branches that trigger a run. [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*

Properties

trigger

string

Disable CI triggers. Acceptable values: [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*

trigger: [ branchFilter ] # List of branches that trigger a run. [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*

Properties

trigger

string

Disable CI triggers. Acceptable values: [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*

trigger: [ branchFilter ] # List of branches that trigger a run. [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*

Properties

trigger

string

Disable CI triggers. Acceptable values: [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*

Examples

trigger:
- main
- develop

trigger: batch, branches, paths

Full syntax for complete control.

trigger:
  batch: boolean # Whether to batch changes per branch.  (false,n,no,off,on,true,y,yes)
  branches:  # Branch names to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 
  paths:  # File paths to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 

Properties

batch

boolean

Whether to batch changes per branch.

branches

include/exclude string list

Branch names to include or exclude for triggering a run.

paths

include/exclude string list

File paths to include or exclude for triggering a run.

trigger: batch, branches, paths, tags

Use the full syntax control for full control over the CI trigger.

trigger:
  batch: boolean # Whether to batch changes per branch.  (false,n,no,off,on,true,y,yes)
  branches:  # Branch names to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 
  paths:  # File paths to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 
  tags:  # Tag names to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 

Properties

batch

boolean

Whether to batch changes per branch.

branches

include/exclude string list

Branch names to include or exclude for triggering a run.

paths

include/exclude string list

File paths to include or exclude for triggering a run.

tags

include/exclude string list

Tag names to include or exclude for triggering a run.

trigger:
  batch: boolean # Whether to batch changes per branch.  (false,n,no,off,on,true,y,yes)
  branches:  # Branch names to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 
  paths:  # File paths to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 
  tags:  # Tag names to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 

Properties

batch

boolean

Whether to batch changes per branch.

branches

include/exclude string list

Branch names to include or exclude for triggering a run.

paths

include/exclude string list

File paths to include or exclude for triggering a run.

tags

include/exclude string list

Tag names to include or exclude for triggering a run.

trigger:
  batch: boolean # Whether to batch changes per branch.  (false,n,no,off,on,true,y,yes)
  branches:  # Branch names to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 
  paths:  # File paths to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 
  tags:  # Tag names to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 

Properties

batch

boolean

Whether to batch changes per branch.

branches

include/exclude string list

Branch names to include or exclude for triggering a run.

paths

include/exclude string list

File paths to include or exclude for triggering a run.

tags

include/exclude string list

Tag names to include or exclude for triggering a run.

trigger:
  batch: boolean # Whether to batch changes per branch.  (false,n,no,off,on,true,y,yes)
  branches:  # Branch names to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 
  paths:  # File paths to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 
  tags:  # Tag names to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 

Properties

batch

boolean

Whether to batch changes per branch.

branches

include/exclude string list

Branch names to include or exclude for triggering a run.

paths

include/exclude string list

File paths to include or exclude for triggering a run.

tags

include/exclude string list

Tag names to include or exclude for triggering a run.

trigger:
  batch: boolean # Whether to batch changes per branch.  (false,n,no,off,on,true,y,yes)
  branches:  # Branch names to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 
  paths:  # File paths to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 
  tags:  # Tag names to include or exclude for triggering a run.
    include: [ branchFilter ] # List of items to include. 
    exclude: [ branchFilter ] # List of items to exclude. 

Properties

batch

boolean

Whether to batch changes per branch.

branches

include/exclude string list

Branch names to include or exclude for triggering a run.

paths

include/exclude string list

File paths to include or exclude for triggering a run.

tags

include/exclude string list

Tag names to include or exclude for triggering a run.

Remarks

If you have many team members uploading changes often, you may want to reduce the number of runs you start. If you set batch to true, when a pipeline is running, the system waits until the run is completed, then starts another run with all changes that have not yet been built. By default, batch is false.

For more information, see Triggers - CI triggers and choose your repository type.

## specific branch build with batching
trigger:
  batch: true
  branches:
    include:
    - main

Examples

trigger:
  batch: true
  branches:
    include:
    - features/*
    exclude:
    - features/experimental/*
  paths:
    exclude:
    - README.md

See also

Learn more about triggers and how to specify them.