* 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>
43 lines
1.1 KiB
YAML
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'))
|