GaTechThomas
GaTechThomas

Reputation: 6076

Azure DevOps multi-stage pipeline deployment to specific environment

We've prototyped a multi-stage YAML pipeline in Azure DevOps. One thing that we need is the ability to manually deploy to one of several environments directly.

In other words, we may want to deploy to Dev environment or to Test environment.

I can think of ways to do it that seem like kludges but would prefer something more proper.

What is the preferred way to set this up?

Upvotes: 3

Views: 2495

Answers (2)

Cece Dong - MSFT
Cece Dong - MSFT

Reputation: 31003

Feature "Manually trigger stage(s) in YAML multi-stage pipelines" has been on Roadmap, check the link below:

https://developercommunity.visualstudio.com/idea/697467/manually-triggered-stages-in-yaml-multi-stage-pipe.html

Currently, you can start a manual run and skip the stages you don't want to run in your pipeline. The run pipeline panel presents a list of stages from the YAML file, and you have the option to skip one or more of those stages.

enter image description here

enter image description here

Upvotes: 1

DreadedFrost
DreadedFrost

Reputation: 2970

What I would recommend is setting up one pipeline that will accept an environment variable at runtime.

I would strongly recommend against doing this though as it defeats the purpose of CI/CD across environment scopes.

Rather would encourage a multi-stage pipeline with a gate approval to subsequent environments.

The reason being is a singular pipeline is best practice to ensure same code is being deployed to each stage.

Upvotes: 1

Related Questions