In Azure Pipelines you have the concept of Artifacts. Artifacts can be things like compiled code coming from a CI build, a Docker container, another source repository and so on…
These artifacts can be used inside your Release pipeline to deploy these artifacts on one or more environments. When switching to YAML pipelines I couldn’t find the concept of artifacts inside the schema definition.
Turns out that inside the YAML template, an artifact is defined by a ‘Resource’. I’ll show you 2 examples to explain how to use them.
Use the output of another pipeline as a Pipeline Resource
Most important settings are:
- The source name: This should match to the name of the pipeline that creates the artifact
- Trigger: This defines if this pipeline should be triggered when the pipeline you are pointing to completes.
Use another repository as a Repository Resource
Most important settings are:
- Repository: This should match to the name of the repository you want to use
- Type: Right now there is support for ‘git’, ‘github’ and ‘bitbucket’. The ‘git’ value should be used when connecting to Azure DevOps.
More information: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/resources?view=azure-devops&tabs=schema