You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pipelines/process/resources.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Resources in YAML pipelines
3
3
description: Learn about defining YAML resources that you can consume in your pipelines and using them to download artifacts, call variables, or trigger pipeline automation.
4
4
ms.topic: conceptual
5
5
ms.assetid: b3ca305c-b587-4cb2-8ac5-52f6bd46c25e
6
-
ms.date: 08/04/2025
6
+
ms.date: 08/05/2025
7
7
monikerRange: "<=azure-devops"
8
8
#customer intent: As an Azure Pipelines user, I want to know about defining and consuming resources in YAML pipelines so I can use the resources to access artifacts and automate workflows.
9
9
---
@@ -16,15 +16,29 @@ This article discusses resources for YAML pipelines. A resource is anything a pi
16
16
17
17
After you define a resource, you can consume it anywhere in your pipeline. For more information and examples, see [Resource definitions](#resource-definitions).
18
18
19
+
```yaml
20
+
resources:
21
+
pipelines:
22
+
- pipeline: resources1
23
+
source: otherPipeline
24
+
25
+
steps:
26
+
- download: resources1
27
+
artifact: artifact1.txt
28
+
```
29
+
19
30
You can use resource status to automatically [trigger](#triggers) pipelines by setting the `trigger` property in the resource definition. The pipeline `resources.triggeringAlias` and `resources.triggeringCategory` variables are then set to the resource name and category. These variables are empty unless the `Build.Reason` variable is set to `ResourceTrigger`.
20
31
21
32
Resources allow full [traceability](#traceability) for the services a pipeline uses, including version, artifacts, associated commits, and work items. If you subscribe to trigger events on your resources, you can fully automate your DevOps workflows.
22
33
34
+
> [!NOTE]
35
+
> This article primarily discusses resources in YAML pipelines. For resources in Classic pipelines, see [About resources for Azure Pipelines](about-resources.md?tabs=classic).
Resources must be authorized to be used in YAML pipelines. Resource owners control the users and pipelines that can access their resources. There are several ways to authorize a YAML pipeline to use resources.
41
+
Resources must be authorized to be used in pipelines. Resource owners control the users and pipelines that can access their resources. There are several ways to authorize a YAML pipeline to use resources.
28
42
29
43
- Use the resource's administration settings to **Grant access permissions to all pipelines**. For example, you can manage secure files and variable groups on the **Pipelines** > **Library** page, and agent pools and service connections in **Project settings** > **Pipelines**. This authorization is convenient for resources you don't need to restrict, such as test resources.
30
44
@@ -87,7 +101,7 @@ resources:
87
101
source: SmartHotel-CI # name of the pipeline that produces the artifacts
88
102
```
89
103
90
-
To consume a pipeline from another project, include the `project` name in the resource definition. The following example also uses `branch` to resolve the default version when the pipeline is triggered manually or by schedule. The branch input can't have wildcards.
104
+
To specify a pipeline from another project, include the `project` name in the resource definition. The following example also uses `branch` to resolve the default version when the pipeline is triggered manually or by schedule. The branch input can't have wildcards.
0 commit comments