Skip to content

Commit

Permalink
Set worker numbers using variables in azure pipeline library (#6927)
Browse files Browse the repository at this point in the history
Approach
What is the motivation for this PR?
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 did you do it?
Use a variable to set the instance number.

How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
  • Loading branch information
yutongzhang-microsoft authored Nov 30, 2022
1 parent 06efba1 commit 7e6f4f6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .azure-pipelines/run-test-scheduler-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ parameters:
default: 36000

- name: MIN_WORKER
type: number
type: string
default: 1

- name: MAX_WORKER
type: number
type: string
default: 2

- name: NUM_ASIC
Expand Down
27 changes: 14 additions & 13 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,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
displayName: "kvmtest-t0-2vlans by TestbedV2"
Expand All @@ -86,7 +86,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:
Expand Down Expand Up @@ -146,8 +147,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:
displayName: "kvmtest-t1-lag"
Expand Down Expand Up @@ -193,8 +194,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
Expand Down Expand Up @@ -225,8 +226,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:
Expand Down Expand Up @@ -255,8 +256,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: wan_testbedv2
Expand All @@ -268,6 +269,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 "

0 comments on commit 7e6f4f6

Please sign in to comment.