0

How can I check the status of individual job in matrix strategy?

jobs:
  - job: A
    strategy:
      matrix:
        nonprod:
          environment: test
        prod:
          environment: prod
    steps:
      - pwsh: Write-host something random
  - job: B
    dependsOn: A
    condition: how do I check only the prod portion of the Job A ?
    steps:
      - pwsh: Write-Host this should run regardless of nonprod matrix portion, but only if prod has succeeded.

1 Answers1

0

You may try something like below:

condition: and(succeeded(), eq(dependencies.A.outputs['prod.Name.Variable'], 'True'))
Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39