1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
parameters:
- name: CloudConfig
type: object
- name: Matrix
type: string
- name: DependsOn
type: string
default: ''
- name: UsePlatformContainer
type: boolean
default: false
jobs:
- job:
dependsOn: ${{ parameters.DependsOn }}
condition: ne(${{ parameters.Matrix }}, '{}')
strategy:
matrix: $[ ${{ parameters.Matrix }} ]
pool:
name: $(Pool)
vmImage: $(OSVmImage)
${{ if eq(parameters.UsePlatformContainer, 'true') }}:
container: $[ variables['Container'] ]
steps:
- pwsh: |
Write-Output "MATRIX JOB PARAMETERS"
Write-Output $(Agent.JobName)
Write-Output "-----------------"
Write-Output $(OSVmImage)
Write-Output $(TestTargetFramework)
try {
Write-Output $(additionalTestArguments)
} catch {}
displayName: Print matrix job variables
- pwsh: |
Write-Output "Success"
displayName: linux OS condition example
condition: and(succeededOrFailed(), contains(variables['OSVmImage'], 'Ubuntu'))
|