How can I set the failed() condition for more than one deploy job in yml file?

Bukola Bisuga 0 Reputation points Microsoft Employee

I have a dependsOn array and I want to set a condition that only runs when either one of 2 of the dependencies fail

dependsOn: ['${{ parameters.deployJobA }}', '${{ parameters.deployJobB }}', '${{ parameters.deployJobC }}']

//I'm not sure if this is the correct way to set the failed condition
condition: failed('${{ parameters.deployJobB}}') or failed('${{ parameters.deployJobC}}')

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,928 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bukola Bisuga 0 Reputation points Microsoft Employee

    This was solved using:

    condition: or(failed('${{ parameters.deployJobB}}'), failed('${{ parameters.
    deployJobC }}'))
    0 comments No comments