From 17fb08b307bfbfa89a3301d909fbc945fdd940e7 Mon Sep 17 00:00:00 2001 From: Yutong Zhang Date: Wed, 9 Nov 2022 14:33:58 +0800 Subject: [PATCH 1/3] [master][TestbedV2] migrate t0-sonic test jobs to TestbedV2 --- .../run-test-scheduler-template.yml | 14 +++++++++++++- azure-pipelines.yml | 18 +++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/run-test-scheduler-template.yml b/.azure-pipelines/run-test-scheduler-template.yml index 265f698e0290..986020022264 100644 --- a/.azure-pipelines/run-test-scheduler-template.yml +++ b/.azure-pipelines/run-test-scheduler-template.yml @@ -30,6 +30,14 @@ parameters: type: string default: "" +- name: VM_TYPE + type: string + default: "ceos" + +- name: SPECIFIED_PARAMS + type: string + default: "{}" + steps: - script: | set -ex @@ -41,7 +49,11 @@ 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 }}" --common-extra-params "${{ parameters.COMMON_EXTRA_PARAMS }}" + 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 }}" --common-extra-params "${{ parameters.COMMON_EXTRA_PARAMS }}" \ + --mgmt-branch ${{ parameters.MGMT_BRANCH }} --vm-type ${{ parameters.VM_TYPE }} --specified-params "${{ parameters.SPECIFIED_PARAMS }}" TEST_PLAN_ID=`cat new_test_plan_id.txt` echo "Created test plan $TEST_PLAN_ID" diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c526b0dc3f2d..b316917bb45f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -290,6 +290,7 @@ stages: pool: sonictest-sonic-t0 displayName: "kvmtest-t0-sonic" timeoutInMinutes: 360 + condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_CLASSICAL_TEST, 'YES')) continueOnError: true steps: - template: .azure-pipelines/run-test-template.yml @@ -328,4 +329,19 @@ stages: MIN_WORKER: 1 MAX_WORKER: 1 COMMON_EXTRA_PARAMS: "--disable_loganalyzer " - + + - job: sonic_t0_testbedv2 + displayName: "kvmtest-t0-sonic by TestbedV2" + 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\"]}' From 235f4f137f30d1d2a55dcc0e3d6e854e49079b95 Mon Sep 17 00:00:00 2001 From: Yutong Zhang Date: Wed, 9 Nov 2022 14:36:29 +0800 Subject: [PATCH 2/3] modify --- .azure-pipelines/run-test-scheduler-template.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.azure-pipelines/run-test-scheduler-template.yml b/.azure-pipelines/run-test-scheduler-template.yml index 986020022264..470558637b47 100644 --- a/.azure-pipelines/run-test-scheduler-template.yml +++ b/.azure-pipelines/run-test-scheduler-template.yml @@ -38,6 +38,10 @@ parameters: type: string default: "{}" +- name: MGMT_BRANCH + type: string + default: master + steps: - script: | set -ex From c591502199de20f4021a9ea9882fcd77cd6031c5 Mon Sep 17 00:00:00 2001 From: Yutong Zhang Date: Thu, 10 Nov 2022 10:02:08 +0800 Subject: [PATCH 3/3] add pool --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b316917bb45f..f0127c325102 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -332,6 +332,8 @@ stages: - 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