[202205][TestbedV2] migrate t0-sonic test jobs to TestbedV2 (#12650)

Migrate t0-sonic test jobs to TestbedV2.

Why I did it
Migrate t0-sonic test jobs to TestbedV2.

How I did it
Add two parameters to create testplan.
Modify azure-pipelines.yml to run t0-sonic on tbv2.

Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
This commit is contained in:
Yutong Zhang 2022-11-10 17:28:51 +08:00 committed by GitHub
parent b57b17318d
commit 4e3a0bb4ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 1 deletions

View File

@ -30,6 +30,18 @@ parameters:
type: string
default: master
- name: VM_TYPE
type: string
default: "ceos"
- name: SPECIFIED_PARAMS
type: string
default: "{}"
- name: COMMON_EXTRA_PARAMS
type: string
default: ""
steps:
- script: |
set -ex
@ -42,7 +54,10 @@ steps:
set -ex
pip install PyYAML
rm -f new_test_plan_id.txt
python ./.azure-pipelines/test_plan.py create -t ${{ parameters.TOPOLOGY }} -o new_test_plan_id.txt --min-worker ${{ parameters.MIN_WORKER }} --max-worker ${{ parameters.MAX_WORKER }} --test-set ${{ parameters.TEST_SET }} --kvm-build-id $(KVM_BUILD_ID) --deploy-mg-extra-params "${{ parameters.DEPLOY_MG_EXTRA_PARAMS }}" --mgmt-branch ${{ parameters.MGMT_BRANCH }}
python ./.azure-pipelines/test_plan.py create -t ${{ parameters.TOPOLOGY }} -o new_test_plan_id.txt --min-worker ${{ parameters.MIN_WORKER }} --max-worker ${{ parameters.MAX_WORKER }} \
--test-set ${{ parameters.TEST_SET }} --kvm-build-id $(KVM_BUILD_ID) \
--deploy-mg-extra-params "${{ parameters.DEPLOY_MG_EXTRA_PARAMS }}" --mgmt-branch ${{ parameters.MGMT_BRANCH }} \
--vm-type ${{ parameters.VM_TYPE }} --specified-params "${{ parameters.SPECIFIED_PARAMS }}" --common-extra-params "${{ parameters.COMMON_EXTRA_PARAMS }}"
TEST_PLAN_ID=`cat new_test_plan_id.txt`
echo "Created test plan $TEST_PLAN_ID"

View File

@ -287,6 +287,7 @@ stages:
pool: sonictest-sonic-t0
displayName: "kvmtest-t0-sonic"
timeoutInMinutes: 360
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_CLASSICAL_TEST, 'YES'))
steps:
- template: .azure-pipelines/run-test-template.yml
@ -296,3 +297,22 @@ stages:
ptf_name: ptf_vms6-1
tbtype: t0-sonic
vmtype: vsonic
- job: sonic_t0_testbedv2
displayName: "kvmtest-t0-sonic by TestbedV2"
pool:
vmImage: 'ubuntu-20.04'
timeoutInMinutes: 1080
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: true
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
parameters:
TOPOLOGY: t0-64-32
MIN_WORKER: 1
MAX_WORKER: 2
TEST_SET: t0-sonic
COMMON_EXTRA_PARAMS: "--neighbor_type=sonic --enable_macsec --macsec_profile=128_SCI,256_XPN_SCI"
VM_TYPE: vsonic
SPECIFIED_PARAMS: '{\"test_pretest.py\":[\"--completeness_level=confident\",\"--allow_recover\"],\"test_posttest.py\":[\"--completeness_level=confident\",\"--allow_recover\"]}'
MGMT_BRANCH: 202205