Skip to content

Commit

Permalink
Merge pull request sonic-net#26 from mssonicbld/sonicbld/202205-merge
Browse files Browse the repository at this point in the history
[code sync] Merge code from sonic-net/sonic-buildimage:202205 to 202205
  • Loading branch information
gechiang committed Jun 9, 2023
2 parents 2b815d2 + 814a05f commit 709e2ee
Show file tree
Hide file tree
Showing 87 changed files with 43,352 additions and 250 deletions.
13 changes: 6 additions & 7 deletions .azure-pipelines/run-test-scheduler-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ steps:
# always use the test plan script from master branch.
wget -O ./.azure-pipelines/test_plan.py https://raw.githubusercontent.com/sonic-net/sonic-mgmt/master/.azure-pipelines/test_plan.py
wget -O ./.azure-pipelines/pr_test_scripts.yaml https://raw.githubusercontent.com/sonic-net/sonic-mgmt/${{ parameters.MGMT_BRANCH }}/.azure-pipelines/pr_test_scripts.yaml
displayName: Download TestbedV2 scripts
displayName: Download test plan scripts
- script: |
set -e
Expand All @@ -77,7 +77,7 @@ steps:
- script: |
set -e
echo "Lock testbed"
echo "TestbedV2 is just online and might not be stable enough, for any issue, please send email to sonictestbedtools@microsoft.com"
echo "SONiC PR system-level test is powered by SONiC Elastictest, for any issue, please send email to sonicelastictest@microsoft.com"
echo "Runtime detailed progress at $(FRONTEND_URL)/scheduler/testplan/$TEST_PLAN_ID "
# When "LOCK_TESTBED" finish, it changes into "PREPARE_TESTBED"
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state LOCK_TESTBED
Expand All @@ -88,9 +88,8 @@ steps:
- script: |
set -e
echo "Prepare testbed"
echo "Preparing the testbed(add-topo, deploy-mg) may take 15-30 minutes. Before the testbed is ready, the progress of the test plan keeps displayed as 0, please be patient(We will improve the indication in a short time)"
echo "If the progress keeps as 0 for more than 1 hour, please cancel and retry this pipeline"
echo "TestbedV2 is just online and might not be stable enough, for any issue, please send email to sonictestbedtools@microsoft.com"
echo "Preparing the testbed(add-topo, deploy-mg) may take 15-30 minutes. Before the testbed is ready, the progress of the test plan keeps displayed as 0, please be patient"
echo "SONiC PR system-level test is powered by SONiC Elastictest, for any issue, please send email to sonicelastictest@microsoft.com"
echo "Runtime detailed progress at $(FRONTEND_URL)/scheduler/testplan/$TEST_PLAN_ID "
# When "PREPARE_TESTBED" finish, it changes into "EXECUTING"
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state PREPARE_TESTBED
Expand All @@ -101,7 +100,7 @@ steps:
- script: |
set -e
echo "Run test"
echo "TestbedV2 is just online and might not be stable enough, for any issue, please send email to sonictestbedtools@microsoft.com"
echo "SONiC PR system-level test is powered by SONiC Elastictest, for any issue, please send email to sonicelastictest@microsoft.com"
echo "Runtime detailed progress at $(FRONTEND_URL)/scheduler/testplan/$TEST_PLAN_ID "
# When "EXECUTING" finish, it changes into "KVMDUMP", "FAILED", "CANCELLED" or "FINISHED"
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state EXECUTING
Expand All @@ -112,7 +111,7 @@ steps:
- script: |
set -e
echo "KVM dump"
echo "TestbedV2 is just online and might not be stable enough, for any issue, please send email to sonictestbedtools@microsoft.com"
echo "SONiC PR system-level test is powered by SONiC Elastictest, for any issue, please send email to sonicelastictest@microsoft.com"
echo "Runtime detailed progress at $(FRONTEND_URL)/scheduler/testplan/$TEST_PLAN_ID "
# When "KVMDUMP" finish, it changes into "FAILED", "CANCELLED" or "FINISHED"
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state KVMDUMP
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ on:
- opened
- reopened
branches:
- '202012'
- '202[1-9][0-9][0-9]'
- '20[3-9][0-9][0-9][0-9]'
- master
paths:
- 'files/build/versions/**'

Expand Down
89 changes: 12 additions & 77 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,41 +139,10 @@ stages:
testResultsFiles: '**/tr.xml'
testRunTitle: vstest

- job: t0_part1
pool: sonictest
displayName: "kvmtest-t0-part1"
timeoutInMinutes: 360
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_CLASSICAL_TEST, 'YES'))
continueOnError: false
steps:
- template: .azure-pipelines/run-test-template.yml
parameters:
dut: vlab-01
tbname: vms-kvm-t0
ptf_name: ptf_vms6-1
tbtype: t0
section: part-1

- job: t0_part2
pool: sonictest
displayName: "kvmtest-t0-part2"
timeoutInMinutes: 360
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_CLASSICAL_TEST, 'YES'))
continueOnError: false
steps:
- template: .azure-pipelines/run-test-template.yml
parameters:
dut: vlab-01
tbname: vms-kvm-t0
ptf_name: ptf_vms6-1
tbtype: t0
section: part-2

- job: t0_testbedv2
- job: t0_elastictest
pool: ubuntu-20.04
displayName: "kvmtest-t0 by TestbedV2"
displayName: "kvmtest-t0 by Elastictest"
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: false
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
Expand All @@ -183,11 +152,10 @@ stages:
MAX_WORKER: $(T0_INSTANCE_NUM)
MGMT_BRANCH: 202205

- job: t0_2vlans_testbedv2
- job: t0_2vlans_elastictest
pool: ubuntu-20.04
displayName: "kvmtest-t0-2vlans by TestbedV2"
displayName: "kvmtest-t0-2vlans by Elastictest"
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: false
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
Expand All @@ -199,25 +167,10 @@ stages:
DEPLOY_MG_EXTRA_PARAMS: "-e vlan_config=two_vlan_a"
MGMT_BRANCH: 202205

- job: t1_lag_classic
pool: sonictest-t1-lag
displayName: "kvmtest-t1-lag classic"
timeoutInMinutes: 360
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_CLASSICAL_TEST, 'YES'))
continueOnError: false
steps:
- template: .azure-pipelines/run-test-template.yml
parameters:
dut: vlab-03
tbname: vms-kvm-t1-lag
ptf_name: ptf_vms6-2
tbtype: t1-lag

- job: t1_lag_testbedv2
- job: t1_lag_elastictest
pool: ubuntu-20.04
displayName: "kvmtest-t1-lag by TestbedV2"
displayName: "kvmtest-t1-lag by Elastictest"
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: false
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
Expand All @@ -227,26 +180,10 @@ stages:
MAX_WORKER: $(T1_LAG_INSTANCE_NUM)
MGMT_BRANCH: 202205

- job:
pool: sonictest-sonic-t0
displayName: "kvmtest-t0-sonic"
timeoutInMinutes: 360
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_CLASSICAL_TEST, 'YES'))
continueOnError: false
steps:
- template: .azure-pipelines/run-test-template.yml
parameters:
dut: vlab-02
tbname: vms-kvm-t0-64-32
ptf_name: ptf_vms6-1
tbtype: t0-sonic
vmtype: vsonic

- job: sonic_t0_testbedv2
- job: sonic_t0_elastictest
pool: ubuntu-20.04
displayName: "kvmtest-t0-sonic by TestbedV2"
displayName: "kvmtest-t0-sonic by Elastictest"
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: false
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
Expand All @@ -260,11 +197,10 @@ stages:
SPECIFIED_PARAMS: '{\"test_pretest.py\":[\"--completeness_level=confident\",\"--allow_recover\"],\"test_posttest.py\":[\"--completeness_level=confident\",\"--allow_recover\"]}'
MGMT_BRANCH: 202205

- job: dualtor_testbedv2
- job: dualtor_elastictest
pool: ubuntu-20.04
displayName: "kvmtest-dualtor-t0 by TestbedV2"
displayName: "kvmtest-dualtor-t0 by Elastictest"
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: false
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
Expand All @@ -275,11 +211,10 @@ stages:
COMMON_EXTRA_PARAMS: "--disable_loganalyzer "
MGMT_BRANCH: 202205

- job: multi_asic_testbedv2
- job: multi_asic_elastictest
pool: ubuntu-20.04
displayName: "kvmtest-multi-asic-t1-lag by TestbedV2"
displayName: "kvmtest-multi-asic-t1-lag by Elastictest"
timeoutInMinutes: 1080
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: false
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
Expand Down
8 changes: 4 additions & 4 deletions build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ elif [ "$IMAGE_TYPE" = "aboot" ]; then
zip -g $OUTPUT_ABOOT_IMAGE .platforms_asic

if [ "$ENABLE_FIPS" = "y" ]; then
echo "sonic_fips=1" > kernel-cmdline
echo "sonic_fips=1" >> kernel-cmdline-append
else
echo "sonic_fips=0" > kernel-cmdline
echo "sonic_fips=0" >> kernel-cmdline-append
fi
zip -g $OUTPUT_ABOOT_IMAGE kernel-cmdline
rm kernel-cmdline
zip -g $OUTPUT_ABOOT_IMAGE kernel-cmdline-append
rm kernel-cmdline-append

zip -g $OUTPUT_ABOOT_IMAGE $ABOOT_BOOT_IMAGE
rm $ABOOT_BOOT_IMAGE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{%- set default_cable = '300m' %}

{%- set ports2cable = {
'torrouter_server' : '300m',
'leafrouter_torrouter' : '300m',
'spinerouter_leafrouter' : '2000m',
'regionalhub_spinerouter': '120000m',
'aznghub_spinerouter' : '120000m'
}
-%}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0,192,4) %}
Expand All @@ -13,7 +22,7 @@
"size": "6441610000",
"type": "both",
"mode": "dynamic",
"xoff": "11678515"
"xoff": "20761804"
}
},
"BUFFER_PROFILE": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{%- set default_cable = '300m' %}

{%- set ports2cable = {
'torrouter_server' : '300m',
'leafrouter_torrouter' : '300m',
'spinerouter_leafrouter' : '2000m',
'regionalhub_spinerouter': '120000m',
'aznghub_spinerouter' : '120000m'
}
-%}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0,192,4) %}
Expand All @@ -13,7 +22,7 @@
"size": "6441610000",
"type": "both",
"mode": "dynamic",
"xoff": "11678515"
"xoff": "1056256819"
}
},
"BUFFER_PROFILE": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{%- set default_cable = '300m' %}

{%- set ports2cable = {
'torrouter_server' : '300m',
'leafrouter_torrouter' : '300m',
'spinerouter_leafrouter' : '2000m',
'regionalhub_spinerouter': '120000m',
'aznghub_spinerouter' : '120000m'
}
-%}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0,144,8) %}
Expand All @@ -13,7 +22,7 @@
"size": "6441610000",
"type": "both",
"mode": "dynamic",
"xoff": "11354112"
"xoff": "396096307"
}
},
"BUFFER_PROFILE": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{%- set default_cable = '300m' %}

{%- set ports2cable = {
'torrouter_server' : '300m',
'leafrouter_torrouter' : '300m',
'spinerouter_leafrouter' : '2000m',
'regionalhub_spinerouter': '120000m',
'aznghub_spinerouter' : '120000m'
}
-%}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(144,288,8) %}
Expand All @@ -13,7 +22,7 @@
"size": "6441610000",
"type": "both",
"mode": "dynamic",
"xoff": "11354112"
"xoff": "396096307"
}
},
"BUFFER_PROFILE": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{%- set default_cable = '300m' %}

{%- set ports2cable = {
'torrouter_server' : '300m',
'leafrouter_torrouter' : '300m',
'spinerouter_leafrouter' : '2000m',
'regionalhub_spinerouter': '120000m',
'aznghub_spinerouter' : '120000m'
}
-%}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0,144,4) %}
Expand All @@ -13,7 +22,7 @@
"size": "6441610000",
"type": "both",
"mode": "dynamic",
"xoff": "11354112"
"xoff": "396096307"
}
},
"BUFFER_PROFILE": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{%- set default_cable = '300m' %}

{%- set ports2cable = {
'torrouter_server' : '300m',
'leafrouter_torrouter' : '300m',
'spinerouter_leafrouter' : '2000m',
'regionalhub_spinerouter': '120000m',
'aznghub_spinerouter' : '120000m'
}
-%}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0,144,4) %}
Expand All @@ -13,7 +22,7 @@
"size": "6441610000",
"type": "both",
"mode": "dynamic",
"xoff": "11354112"
"xoff": "396096307"
}
},
"BUFFER_PROFILE": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{%- set default_cable = '300m' %}

{%- set ports2cable = {
'torrouter_server' : '300m',
'leafrouter_torrouter' : '300m',
'spinerouter_leafrouter' : '2000m',
'regionalhub_spinerouter': '120000m',
'aznghub_spinerouter' : '120000m'
}
-%}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0,144,8) %}
Expand All @@ -13,7 +22,7 @@
"size": "6441610000",
"type": "both",
"mode": "dynamic",
"xoff": "11354112"
"xoff": "1582033305"
}
},
"BUFFER_PROFILE": {
Expand Down
Loading

0 comments on commit 709e2ee

Please sign in to comment.