79254792

Date: 2024-12-05 13:09:37
Score: 2
Natty:
Report link

According to this reference, the correct usage for these cases id and(not(failed()), not(cancelled())): https://blogs.blackmarble.co.uk/rfennell/using-azure-devops-stage-dependency-variables-with-conditional-stage-and-job-execution/

[![enter image description here][1]][1]

So, the solution then:

jobs:
      - ${{ each package in parameters. librariesToBePublished }}:
        - job: Publish_package_${{ replace(package.name, '-', '_') }}
          displayName: "Publish ${{ package.name }}"
          dependsOn:
            - ${{ each dep in package.dependsOn }}:
              - Publish_package_${{ replace(dep, '-', '_') }}
          condition: |
            and(
              not(failed()),
              not(cancelled()),
              eq('${{parameters[package.name]}}', true)
            )


  [1]: https://i.sstatic.net/AJ12GX78.png
Reasons:
  • Blacklisted phrase (1): enter image description here
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: yenerunver