Share via


resources.pipelines.pipeline definition

If you have an Azure Pipeline that produces artifacts, your pipeline can consume the artifacts by defining a pipeline resource. In Azure DevOps Server 2020 and higher, you can also enable pipeline completion triggers using a pipeline resource.

pipelines:
- pipeline: string # Required as first property. ID of the pipeline resource.
  project: string # Project for the source; defaults to current project.
  source: string # Name of the pipeline that produces the artifact.
  version: string # The pipeline run number to pick the artifact, defaults to latest pipeline successful across all stages; used only for manual or scheduled triggers.
  branch: string # Branch to pick the artifact. Optional; defaults to all branches, used only for manual or scheduled triggers.

Definitions that reference this definition: resources.pipelines

Properties

pipeline string. Required as first property.
ID of the pipeline resource. Acceptable values: [-_A-Za-z0-9]*.

project string.
Project for the source; defaults to current project.

source string.
Name of the pipeline that produces the artifact. If the pipeline is contained in a folder, include the folder name, including the leading \, for example \security pipelines\security-lib-ci. This property is not case sensitive and does not need quotes if the name include spaces. The folder path must be specified if there are multiple pipelines with the same name.

version string.
The pipeline run number to pick the artifact, defaults to latest pipeline successful across all stages; used only for manual or scheduled triggers.

branch string.
Branch to pick the artifact. Optional; defaults to all branches, used only for manual or scheduled triggers.

Remarks

Note

pipeline: specifies the name of the pipeline resource. Use the label defined here when referring to the pipeline resource from other parts of the pipeline, such as when using pipeline resource variables or downloading artifacts.

You can consume artifacts from a pipeline resource by using a download task. See the steps.download keyword.

Examples

resources:
  pipelines:
  - pipeline: MyAppA
    source: MyCIPipelineA
  - pipeline: MyAppB
    source: MyCIPipelineB
    trigger: true
  - pipeline: MyAppC
    project:  DevOpsProject
    source: MyCIPipelineC
    branch: releases/M159
    version: 20190718.2
    trigger:
      branches:
        include:
        - main
        - releases/*
        exclude:
        - users/*

See also