My YAML file already contains a Resource section and now I want to add a pipeline to the resource section to trigger my publish pipeline after the PR pipeline is successful. THis works fine and the pipeline is trigger when a merge is made to the main branch
Here are the relevant sections as they stand now
trigger:
- main
---------- removed parameter and variable sections for brevity -----------
resources:
repositories:
- repository: templates
type: git
name: OneBranch.Pipelines/GovernedTemplates
ref: refs/heads/main
Based on several SO posts like this one: Azure Devops – How to call one pipeline from another
I modified the YAML as such:
trigger:
- none
---------- removed parameter and variable sections for brevity -----------
resources:
repositories:
- repository: templates
type: git
name: OneBranch.Pipelines/GovernedTemplates
ref: refs/heads/main
pipelines:
- pipeline: DRIContactManagement-Official
source: DRIContactManagement-PullRequest
trigger: true
When I run the modified YAML, the pipeline fails with the error: (Line: 14, Col: 1): Did not find expected <document start>.
The line number is right below the “trigger”.
Any suggestions to fix this?