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