
Recently I have been migrating classic Azure DevOps pipelines to YAML. I didn’t create the original pipelines and the requirements of the build are quite specific. It’s been a great opportunity to learn some of
variables:
- Name: var1
value: |
This is a multi-line variable
and it goes across multiple lines
trigger: none
resources:
repositories:
- repository: mycode
type: git
name: project/mycode
ref: "refs/heads/main"
trigger:
branches:
include:
- main
- release/*
variables:
- name: codeRepoName
value: $[ resources.repositories['mycode'].name]
- name: codeRepoRef
value: $[ resources.repositories['mycode'].ref]