d3040bd804
* Add azure pipelines for reproducible build * Add always build flag for upgrade build * Fix the build version ubuntu-20.04
54 lines
1.7 KiB
YAML
54 lines
1.7 KiB
YAML
parameters:
|
|
- name: 'preSteps'
|
|
type: stepList
|
|
default: []
|
|
- name: "postSteps"
|
|
type: stepList
|
|
default: []
|
|
- name: 'jobGroups'
|
|
type: object
|
|
default: []
|
|
- name: 'jobVariables'
|
|
type: object
|
|
default: {}
|
|
- name: 'scriptEnv'
|
|
type: object
|
|
default: ''
|
|
- name: 'timeoutInMinutes'
|
|
type: 'number'
|
|
default: 1440
|
|
- name: 'jobFilters'
|
|
type: object
|
|
default: ''
|
|
|
|
jobs:
|
|
- ${{ each jobGroup in parameters.jobGroups }}:
|
|
- ${{ if or(eq(parameters.jobFilters, ''), containsValue(parameters.jobFilters, jobGroup.name)) }}:
|
|
- job: ${{ replace(format('{0}{1}', jobGroup.name, jobGroup.extName), '-', '_') }}
|
|
${{ each pair in jobGroup }}:
|
|
${{ if not(in(pair.key, 'job', 'name', 'extName', 'variables', 'steps', 'script', 'scriptEnv')) }}:
|
|
${{ pair.key }}: ${{ pair.value }}
|
|
${{ if eq(jobGroup.timeoutInMinutes, '') }}:
|
|
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
|
|
variables:
|
|
GROUP_NAME: ${{ jobGroup.name }}
|
|
GROUP_EXTNAME: '${{ jobGroup.extName }}'
|
|
GROUP_NAMES: ${{ join(',', parameters.jobGroups.*.name ) }}
|
|
${{ if ne(jobGroup.variables, '') }}:
|
|
${{ jobGroup.variables }}
|
|
${{ each para in parameters.jobvariables }}:
|
|
${{ if eq(jobGroup.variables[para.key], '') }}:
|
|
${{ para.key }}: ${{ para.value }}
|
|
steps:
|
|
- ${{ parameters.preSteps }}
|
|
- ${{ if ne(jobGroup.script, '') }}:
|
|
- script: |
|
|
${{ jobGroup.script }}
|
|
env:
|
|
${{ if ne(parameters.scriptEnv, '') }}:
|
|
${{ parameters.scriptEnv }}
|
|
displayName: 'JobScript'
|
|
- ${{ if ne(jobGroup.steps, '') }}:
|
|
- ${{ jobGroup.steps }}
|
|
- ${{ parameters.postSteps }}
|