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

Bukola Bisuga 0 Reputation points Microsoft Employee
2023-02-28T01:28:18.5966667+00:00

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,999 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bukola Bisuga 0 Reputation points Microsoft Employee
    2023-02-28T16:48:27.91+00:00

    This was solved using:

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