TransWikia.com

Azure DevOps Different Post Deployment script per environment

DevOps Asked by Adrian S on August 22, 2021

I have a visual studio database project being built and released through Azure DevOps.

I need to execute a different post deployment for Dev vs. Prod.

Is there a way to achieve this either through the release pipeline or the visual studio project?

One Answer

You can define multiple stages in a release pipeline. Each stage (i.e. Dev, Prod) can have its own set of tasks and/or other factors that differ. If you want the same set of tasks, you can duplicate a stage then change what's needed. Alternatively, you can configure the tasks using pipeline variables. The variables can be defined to have different values based on the stage scope (or applicable to the release scope). This way, each stage is essentially the same set of tasks but at runtime each behaves differently based on the variable values applicable to it at runtime.

See the MS docs on stages based on your pipeline type preference:

Answered by Peter on August 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP