sonic-buildimage/.azure-pipelines/azure-pipelines-job-groups.yml
Saikrishna Arcot a8ae39d65b
[ci]: Increase pipeline build timeout from 12 hours to 15 hours (#9200)
With a Bullseye upgrade, a change that requires everything to get
rebuilt (including the slave containers) takes about 12 hours (the vs
job that builds the virtual switch image as well as the PTF container
sometimes times out towards the end). Part of this is because the kernel
is now built after all of the sonic containers (kernel is built in a
Bullseye slave, the docker containers are built in a Buster slave).
Another part is because during the ptf container build, for some reason,
all of the docker containers are rebuilt.

Therefore, to make sure PRs don't time out after Bullseye gets merged
in, bump up the timeout from 12 hours to 15 hours. This should be enough
for the builds to complete.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2021-11-09 07:35:18 -08:00

58 lines
1.9 KiB
YAML

parameters:
- name: 'preSteps'
type: stepList
default: []
- name: 'buildSteps'
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: 900
- name: 'jobFilters'
type: object
default: ''
jobs:
- ${{ each jobGroup in parameters.jobGroups }}:
- ${{ if or(eq(parameters.jobFilters, ''), containsValue(parameters.jobFilters, jobGroup.name), endswith(variables['Build.DefinitionName'], format('.{0}{1}', jobGroup.name, jobGroup.extName))) }}:
- 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.buildSteps }}
- ${{ parameters.postSteps }}