I created a classic release pipeline in Azure DevOps that looks like the following (this was just to test and verify I could re-create an issue I was having with another pipeline):
Each of the deployment group jobs is configured to "Run this job" "Only when all previous jobs have succeeded". It works great unless one of the PowerShell scripts fails and I want to redeploy. For example, lets say the PowerShell Script task for "Start Maintenance Mode" fails and I redeploy and choose the option to only "Redeploy to All jobs and deployment group targets that are either in failed, cancelled or skipped state". If I do that, it skips the PowerShell Task in "Do Something, Anything" (as expected), it then runs the failed PowerShell task for "Start Maintenance Mode" (as expected, and succeeds this time), but then it skips the PowerShell Task for "Stop Maintenance Mode" (not expected, since it was skipped last time and should be run during the redeploy). It shows "The job was skipped due to an unsatisfied condition.", and no further detail beyond that:
I've played around with custom conditions using variable expressions to try to get it to work, but I've had no luck. What am I missing/not understanding? What needs to be done to get it to redeploy and work correctly so that it actually runs all of the tasks that were skipped previously?