File: matrix-job-sample.yml

package info (click to toggle)
golang-github-azure-azure-sdk-for-go 68.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 556,256 kB
  • sloc: javascript: 196; sh: 96; makefile: 7
file content (42 lines) | stat: -rw-r--r-- 1,080 bytes parent folder | download | duplicates (3)
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'))