azure-sdk-for-cpp/eng/common/scripts/job-matrix/samples/matrix-job-sample.yml
Azure SDK Bot 5a1fedd0d5
Sync eng/common directory with azure-sdk-tools for PR 1429 (#1705)
* Add job matrix generation scripts

* Add working job matrix example pipeline and common matrix generation pipeline.

* Update job matrix tests path

* Parameterize matrix generation job path

* Add global variable to override nuget security checks to sample matrix pipeline

* Update readme matrix pipeline example to match sample file

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2021-02-19 14:45:31 -08:00

43 lines
1.1 KiB
YAML

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'))