Support passing the instance numbers of a testplan. (#12879)

Previously, we hard code the min and max numbers of instance in a plan. In this pr, we support passing the instance numbers of a testplan.

Why I did it
Previously, we hard code the min and max numbers of instance in a plan. In this pr, we support passing the instance numbers of a testplan.

How I did it
Use a variable to set the instance number.
This commit is contained in:
Yutong Zhang 2022-11-30 22:36:55 +08:00 committed by GitHub
parent f725b83bd6
commit df4312f7ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 16 deletions

View File

@ -11,12 +11,12 @@ parameters:
default: 36000
- name: MIN_WORKER
type: number
type: string
default: 1
- name: MAX_WORKER
type: number
default: 2
type: string
default: 1
- name: TEST_SET
type: string

View File

@ -184,8 +184,8 @@ stages:
- template: .azure-pipelines/run-test-scheduler-template.yml
parameters:
TOPOLOGY: t0
MIN_WORKER: 2
MAX_WORKER: 3
MIN_WORKER: $(T0_INSTANCE_NUM)
MAX_WORKER: $(T0_INSTANCE_NUM)
- job: t0_2vlans_testbedv2
pool:
@ -199,7 +199,8 @@ stages:
parameters:
TOPOLOGY: t0
TEST_SET: t0-2vlans
MAX_WORKER: 1
MIN_WORKER: $(T0_2VLANS_INSTANCE_NUM)
MAX_WORKER: $(T0_2VLANS_INSTANCE_NUM)
DEPLOY_MG_EXTRA_PARAMS: "-e vlan_config=two_vlan_a"
- job:
@ -261,8 +262,8 @@ stages:
- template: .azure-pipelines/run-test-scheduler-template.yml
parameters:
TOPOLOGY: t1-lag
MIN_WORKER: 2
MAX_WORKER: 3
MIN_WORKER: $(T1_LAG_INSTANCE_NUM)
MAX_WORKER: $(T1_LAG_INSTANCE_NUM)
- job:
pool:
@ -328,8 +329,8 @@ stages:
parameters:
TOPOLOGY: t1-8-lag
TEST_SET: multi-asic-t1-lag
MIN_WORKER: 1
MAX_WORKER: 1
MIN_WORKER: $(MULTI_ASIC_INSTANCE_NUM)
MAX_WORKER: $(MULTI_ASIC_INSTANCE_NUM)
NUM_ASIC: 4
- job: dualtor_testbedv2
@ -343,8 +344,8 @@ stages:
- template: .azure-pipelines/run-test-scheduler-template.yml
parameters:
TOPOLOGY: dualtor
MIN_WORKER: 1
MAX_WORKER: 1
MIN_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
MAX_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
COMMON_EXTRA_PARAMS: "--disable_loganalyzer "
- job: sonic_t0_testbedv2
@ -358,8 +359,8 @@ stages:
- template: .azure-pipelines/run-test-scheduler-template.yml
parameters:
TOPOLOGY: t0-64-32
MIN_WORKER: 1
MAX_WORKER: 2
MIN_WORKER: $(T0_SONIC_INSTANCE_NUM)
MAX_WORKER: $(T0_SONIC_INSTANCE_NUM)
TEST_SET: t0-sonic
COMMON_EXTRA_PARAMS: "--neighbor_type=sonic --enable_macsec --macsec_profile=128_SCI,256_XPN_SCI"
VM_TYPE: vsonic
@ -376,6 +377,6 @@ stages:
- template: .azure-pipelines/run-test-scheduler-template.yml
parameters:
TOPOLOGY: wan-pub
MIN_WORKER: 1
MAX_WORKER: 1
MIN_WORKER: $(WAN_INSTANCE_NUM)
MAX_WORKER: $(WAN_INSTANCE_NUM)
COMMON_EXTRA_PARAMS: "--skip_sanity "