I am wondering if Azure DevOps has the ability to do conditional flow as part of a release definition.
My use case: I have a PowerShell script that deploys a SQL Server DACPAC to create or update a database. Sometimes this deployment will fail because a change was made that could potentially cause data loss. Instead of absolutely failing the deployment, I would like to trigger a manual intervention for a DBA to review the changes. If they resume, I would like to attempt the deployment again, but this time with a flag that will ignore potential data loss issues.
Finally, if that second db deployment attempt is successful, I would like the flow to continue back to the rest of the deployment tasks.
Here is a general flow diagram:
Other requirements:
- If the db deployment fails, but the manual intervention resumes and succeeds, I want the entire deployment to be marked as succeeded.
- I want the flow after resuming an intervention to merge back into existing tasks that would be run on db deployment success. Corollary: I do not want to maintain dual flows with identical tasks.
I am using the Designer (Web UI) and not YAML for all my current builds/releases, but I am also interested if YAML has a solution for this.
Azure DevOps has a section for Conditions, but I did not find that particularly helpful. The number of conditions seems limited. It also looks like variables can be set on jobs, but this appears to be only available with YAML.
Is there a way to set up the conditionals at the end of phases/jobs or tasks to achieve this branching behavior?