HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Azure Devops, multiple on-prem environments, variables per environment

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
premperenvironmentazuredevopsmultiplevariablesenvironments

Problem

I've configured first deployment pipeline to an on-prem DEV environment.
The project consists of 3 identical environments, DEV, UAT and PROD
While their setup is exactly alike, their config (database credentials etc.) is obviously not.

I'm using the DevOps variables to alter web.config and appsettings.json configuration files while deploying.
Therefore I'd like to apply the same deployment pipeline, targeting 3 different environments with 3 different variables sets.

This is the way I've seen in Octopus. Is it possible in the DevOps?

Solution

You can create a Release Pipeline with a stage for every environment; each stage has a different variable group, defining that environment's settings.

On each stage you can copy files, etc. and run tests against the environment.

If the test/stage succeeds, the pipeline goes ahead to the next stage.
Between the stages, you can configure that an authorized person has to approve the next step.

The screenshot below is a release pipeline of one of my little side projects.

Context

StackExchange DevOps Q#9787, answer score: 2

Revisions (0)

No revisions yet.