I have pipeline A which is a build pipeline that produces artifacts, and I have pipeline B which has
pipelines:
- pipeline: Pipeline_A
source: Pipeline A
trigger:
branches:
- main
This means that when pipeline A finishes a build it will trigger pipeline B and pipeline B automatically downloads any artifacts from the triggering pipeline A run. This is what I want and is working as expected. However I need to be able to also specify a build number in the case of a manual trigger. For instance if there’s a hotfix*
branch and we don’t want automatic releases, but we would now like to manually deploy the result of that build… I can add branch and build number as parameters and get this to download the artifact well enough (with the download build artifact step), but it would be great to not also download the artifacts from the latest build that matches the branches in the trigger, which is what happens now. Is there a way to ignore the dependency if it’s not an automatically triggered run?
I have considered I can add the download build artifact step with a condition for the trigger, and only download the specific artifacts I want when it’s a manual build, but the pipeline will also download the artifacts from the latest build in a branch matching the branch filter on the resource.