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!

Related Questions

how to set a variable from an ini file in ansible?

2  Asked on August 22, 2021 by a1an


Create service per pod in statefulset

1  Asked on August 22, 2021 by flowerprogrammer


Clarification about Operational Support System

1  Asked on August 22, 2021 by hansinee-nawanjana


Ansible – Handler not found on first attempt

3  Asked on August 22, 2021 by eric-saindon


Run command from Jenkins to Linux Server

1  Asked on August 22, 2021 by ankit-thakkar


Azure Devops Pipelines Triggers not working

2  Asked on August 22, 2021 by pradeep-upadhyay


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP