Define whether a test is required by code (#11921)
* Define whether a test is required by code Why I did it Define whether a test job is required before merging by code. Let the failure of multi-asic and t0-sonic don't block pr merge. The 'required' configuration can be modified by the owner in the future. How I did it Required: t1-lag, t0 Not required: multi-asic, t0-sonic How to verify it AZP itself verifies it. Signed-off-by: jianquanye@microsoft.com
This commit is contained in:
parent
a6843927d9
commit
750e1b3017
@ -51,9 +51,6 @@ steps:
|
||||
rm -rf $(Build.ArtifactStagingDirectory)/*
|
||||
docker exec sonic-mgmt bash -c "/data/sonic-mgmt/tests/kvmtest.sh -en -T ${{ parameters.tbtype }} ${{ parameters.tbname }} ${{ parameters.dut }} ${{ parameters.section }}"
|
||||
displayName: "Run tests"
|
||||
${{ if eq(parameters.tbtype, 'multi-asic-t1-lag-pr') }}:
|
||||
continueOnError: true
|
||||
|
||||
- script: |
|
||||
# save dut state if test fails
|
||||
virsh_version=$(virsh --version)
|
||||
|
@ -81,6 +81,10 @@ stages:
|
||||
- name: testbed_file
|
||||
value: vtestbed.csv
|
||||
|
||||
# For every test job:
|
||||
# continueOnError: false means it's a required test job and will block merge if it fails
|
||||
# continueOnError: true means it's an optional test job and will not block merge even though it fails(unless a required test job depends on its result)
|
||||
|
||||
jobs:
|
||||
- job:
|
||||
pool: sonictest
|
||||
@ -133,7 +137,7 @@ stages:
|
||||
pool: sonictest
|
||||
displayName: "kvmtest-t0-part1"
|
||||
timeoutInMinutes: 360
|
||||
|
||||
continueOnError: true
|
||||
steps:
|
||||
- template: .azure-pipelines/run-test-template.yml
|
||||
parameters:
|
||||
@ -147,7 +151,7 @@ stages:
|
||||
pool: sonictest
|
||||
displayName: "kvmtest-t0-part2"
|
||||
timeoutInMinutes: 360
|
||||
|
||||
continueOnError: true
|
||||
steps:
|
||||
- template: .azure-pipelines/run-test-template.yml
|
||||
parameters:
|
||||
@ -165,6 +169,7 @@ stages:
|
||||
- t0_part1
|
||||
- t0_part2
|
||||
condition: always()
|
||||
continueOnError: false
|
||||
variables:
|
||||
resultOfPart1: $[ dependencies.t0_part1.result ]
|
||||
resultOfPart2: $[ dependencies.t0_part2.result ]
|
||||
@ -183,7 +188,7 @@ stages:
|
||||
pool: sonictest-t1-lag
|
||||
displayName: "kvmtest-t1-lag"
|
||||
timeoutInMinutes: 360
|
||||
|
||||
continueOnError: false
|
||||
steps:
|
||||
- template: .azure-pipelines/run-test-template.yml
|
||||
parameters:
|
||||
@ -196,7 +201,7 @@ stages:
|
||||
pool: sonictest-sonic-t0
|
||||
displayName: "kvmtest-t0-sonic"
|
||||
timeoutInMinutes: 360
|
||||
|
||||
continueOnError: true
|
||||
steps:
|
||||
- template: .azure-pipelines/run-test-template.yml
|
||||
parameters:
|
||||
@ -210,7 +215,7 @@ stages:
|
||||
pool: sonictest-ma
|
||||
displayName: "kvmtest-multi-asic-t1-lag"
|
||||
timeoutInMinutes: 240
|
||||
|
||||
continueOnError: true
|
||||
steps:
|
||||
- template: .azure-pipelines/run-test-template.yml
|
||||
parameters:
|
||||
|
Loading…
Reference in New Issue
Block a user