Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Release Pipelines - Is it possible to prevent a manual trigger stage until another stage is complete

In Octopus Deploy there is the concept of lifecycles. They look something like the following -

  • Dev
    • DevEnv1
    • DevEnv2
  • Staging
    • StagingEnv
  • Prod
    • ProdEnv

It allows you to say things like "Environments from Dev must be completed before deploying to Staging".

In Azure Devops you can achieve this if you use an "After Stage" trigger. However this makes the deployment to the next stage automatic. You can set either post-1st stage or pre-2nd stage approvals to stop this but if these are "rejected" then it looks like a failure when it isn't necessarily so - quite often we just don't want to deploy to these environments.

Another workaround is to use the REST API in a gate on a manually triggered stage as shown in this question but this doesn't feel right - it throws off the "deployment graph" which may seem trivial but it doesn't allow someone coming in from the outside to see what's really going on. Also it doesn't stop anybody trying to manually trigger this at any time.

Is there a way to achieve this?

like image 753
Zak Avatar asked Dec 06 '25 08:12

Zak


1 Answers

I am afraid that there is no better way at the moment. Even if you use workaround with rest api in the gate, if you don't pass the gate, the resulting stage state is the same as "rejected". enter image description here enter image description here

like image 152
Hugh Lin Avatar answered Dec 08 '25 00:12

Hugh Lin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!