I want:
- PipelineA builds and uploads an artifact, when that completes successfully
- PipelineB runs and downloads PipelineA's artifact
PipelineA's trigger:
trigger:
branches:
include:
- release/*
- master
This works as expected, PipelineA will run and build an artifact whenever a code change is made.
PipelineB's trigger (does not work!)
trigger: none # important! we do not want to be deploying to environments without an artifact
resources:
pipelines:
- pipeline: PipelineALocal # does not matter, only for pulling down local vars
source: PipelineA # the exact name defined in ADO
trigger: true # tried every variant under the sun to get this working but this pipeline will never run
I've tried every combination of triggers including the (apparently should always work trigger: true?) but nothing works. The pipeline never triggers.
Under resources.pipelines.branches.include, I've tried: refs/heads/master, master, refs/heads/release/*, release/* and everything in-between. With proper YAML formatting of course.
The documentation is very confusing, but I managed to figure out how to get the runID from a pipeline alias.
--
I've resorted to trying to go through the triggers UI and configure a PipelineB Build completion trigger based on PipelineA succeeding.
That only works for the master branch, so I cannot use variables['Build.SourceBranch'] to determine if this is a staging or release build.
How do you trigger a CD pipeline dependent on a CI pipeline succeeding?

