I have a simple Azure Pipeline containing two stages:
- Stage 1: Build
- Stage 2: Run tests
Stage 1 builds the source code and pushes the binaries to Azure Artifacts. Stage 2 downloads the binaries of Stage 1 and runs multiple tests against them, using different jobs for different tests:
- Job 1: Run tests for module A
- Job 2: Run tests for module B
- Job 3: Run tests for module C
These jobs are completely indepent of each other and run in parallel.
If all stages and jobs succeed, how can I manually trigger Job 3 in Stage 2 without triggering Stage 1 and Job 1 and 2 of Stage 2 again?
One ugly work around might be to use variables and somehow run a new pipeline, skip stage 1 if the variables are set and download the binaries from a previous pipeline. Are there better approaches?
Edit: There is a similar topic ongoing on ms dev community: https://developercommunity.visualstudio.com/idea/697467/manually-triggered-stages-in-yaml-multi-stage-pipe.html?childToView=903723#comment-903723