Reputation: 111
from what I understand, in YAML pipelines you can select 'Stages to Run' and thus basically allow to skip stages entirely for whatever reason. However I do not see same functionality in the GUI release pipelines. I only see option 'Manual Only' - is 'Manual Only' usable in the scenario where I have dev > Test > Prod and I want to skip Test but keep the release pipeline structure intact? What is the best practice for this? So far I can see only option to have Both build and release in YAML.
Thanks.
Upvotes: 5
Views: 20903
Reputation: 3185
If you use yaml pipeline having multi-stages, “Stages to run” feature allows you to skip a few stages in your pipeline as stated here: Skipping stages in a YAML pipeline.
If you want to implement this feature in classic release pipeline, please follow below steps.
Upvotes: 10
Reputation: 1145
There are really a lot of ways to go about this, but the main ones I'll point out are:
You were correct in thinking Manual deployment could work here using the various stages and branching out. (See Screenshot link below)
Release Pipeline with manual deployment paths
In this scenario DEV is deployed as soon as there is a new Release, then you can manually specify which path you want the rest of deployments to go (straight to Prod, or Test to Prod).
This is probably a little cleaner than the manual deployment and has the plus of being able to specify specific users or a group. (Link to screenshot below)
Release Pipeline with Pre-Approval condition
After testing this I confirmed you are able to trigger varying releases based upon tagging specified in the Build Pipeline. I believe you can do the same for pull requests
Based on this tagging, it can determine through the Continuous Deployment filter process which release pipeline to run.
The Screenshot and steps below are the steps needed to make this work:
Write-Host "##vso[build.addbuildtag]$env:ProdOnly_TestThenProd"
Refer to this gif for reference: Build PipelineI like this #3 option because it allows you to have CI/CD cycle, but also if you need to run a one off pipeline, maybe release straight to Prod or some other stage, then it gives you flexibility to do so without a ton of manual work. Hopefully this answers your question.
Upvotes: 3