Skip to content

Commit

Permalink
Merge branch '202012' of https://github.com/Azure/sonic-buildimage in…
Browse files Browse the repository at this point in the history
…to internal-202012
  • Loading branch information
yxieca committed Jan 5, 2023
2 parents 93626ea + 0e63a94 commit 1d9d2f8
Show file tree
Hide file tree
Showing 159 changed files with 1,099 additions and 1,173 deletions.
10 changes: 10 additions & 0 deletions .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,17 @@ jobs:
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).raw
fi
if [ $(docker_syncd_rpc_image) == yes ]; then
# workaround for issue in rules/sairedis.dep, git ls-files will list un-exist files for cache
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/docker-syncd-$(platform_rpc)-rpc.gz
pushd ./src/sonic-sairedis/SAI
git stash
popd
if [ $(GROUP_NAME) == broadcom ]; then
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y SAITHRIFT_V2=y target/docker-saiserverv2-brcm.gz
pushd ./src/sonic-sairedis/SAI
git stash
popd
fi
fi
if [ $(syncd_rpc_image) == yes ]; then
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/sonic-$(GROUP_NAME).bin
Expand Down
10 changes: 10 additions & 0 deletions .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@ jobs:
fi
if [ ${{ parameters.sync_rpc_image }} == true ]; then
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) ENABLE_SYNCD_RPC=y target/docker-syncd-${{ parameters.platform_short }}-rpc.gz
# workaround for issue in rules/sairedis.dep, git ls-files will list un-exist files for cache
pushd ./src/sonic-sairedis/SAI
git stash
popd
if [ ${{ parameters.platform }} == broadcom ]; then
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) ENABLE_SYNCD_RPC=y SAITHRIFT_V2=y target/docker-saiserverv2-brcm.gz
pushd ./src/sonic-sairedis/SAI
git stash
popd
fi
fi
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) target/sonic-${{ parameters.platform }}.bin
Expand Down
9 changes: 5 additions & 4 deletions .azure-pipelines/docker-sonic-slave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ trigger:
paths:
include:
- sonic-slave-*
- src/sonic-build-hooks
- files/build/versions
- Makefile
- Makefile.work
Expand All @@ -56,7 +55,7 @@ parameters:
default: sonicdev

stages:
- stage: Build
- stage: Build_in_amd64
jobs:
- ${{ each dist in parameters.dists }}:
- ${{ if endswith(variables['Build.DefinitionName'], dist) }}:
Expand All @@ -66,7 +65,9 @@ stages:
pool: sonicbld
arch: ${{ arch }}
dist: ${{ dist }}
- stage: Build_march
${{ if ne(arch, 'amd64') }}:
march: _march_${{ arch }}
- stage: Build_native_arm
dependsOn: []
jobs:
- ${{ each dist in parameters.dists }}:
Expand All @@ -78,4 +79,4 @@ stages:
pool: sonicbld-${{ arch }}
arch: ${{ arch }}
dist: ${{ dist }}
march: march_
march: _${{ arch }}
16 changes: 6 additions & 10 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: TEST_SET
Expand Down Expand Up @@ -67,11 +67,10 @@ steps:
echo "TestbedV2 is just online and might not be stable enough, for any issue, please send email to sonictestbedtools@microsoft.com"
echo "Runtime detailed progress at https://www.testbed-tools.org/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)" --timeout 43200 --expected-states PREPARE_TESTBED EXECUTING KVMDUMP FINISHED CANCELLED FAILED
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state LOCK_TESTBED
env:
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL)
displayName: Lock testbed
timeoutInMinutes: 240
- script: |
set -ex
Expand All @@ -81,36 +80,33 @@ steps:
echo "TestbedV2 is just online and might not be stable enough, for any issue, please send email to sonictestbedtools@microsoft.com"
echo "Runtime detailed progress at https://www.testbed-tools.org/scheduler/testplan/$TEST_PLAN_ID"
# When "PREPARE_TESTBED" finish, it changes into "EXECUTING"
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --timeout 2400 --expected-states EXECUTING KVMDUMP FINISHED CANCELLED FAILED
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state PREPARE_TESTBED
env:
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL)
displayName: Prepare testbed
timeoutInMinutes: 40
- script: |
set -ex
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 "Runtime detailed progress at https://www.testbed-tools.org/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)" --timeout 18000 --expected-states KVMDUMP FINISHED CANCELLED FAILED
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state EXECUTING
env:
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL)
displayName: Run test
timeoutInMinutes: 300
- script: |
set -ex
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 "Runtime detailed progress at https://www.testbed-tools.org/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)" --timeout 43200 --expected-states FINISHED CANCELLED FAILED
python ./.azure-pipelines/test_plan.py poll -i "$(TEST_PLAN_ID)" --expected-state KVMDUMP
condition: succeededOrFailed()
env:
TESTBED_TOOLS_URL: $(TESTBED_TOOLS_URL)
displayName: KVM dump
timeoutInMinutes: 20
- script: |
set -ex
Expand Down
6 changes: 6 additions & 0 deletions .azure-pipelines/template-variables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
variables:
DEFAULT_CONTAINER_REGISTRY: 'publicmirror.azurecr.io'
COMMON_LIB_BUILD_ENVS: 'bullseye'
SONIC_SLAVE_DOCKER_DRIVER: 'overlay2'
SONIC_BUILD_RETRY_COUNT: 3
SONIC_BUILD_RETRY_INTERVAL: 600
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ PLATFORM_PATH := platform/$(if $(PLATFORM),$(PLATFORM),$(CONFIGURED_PLATFORM))
PLATFORM_CHECKOUT := platform/checkout
PLATFORM_CHECKOUT_FILE := $(PLATFORM_CHECKOUT)/$(PLATFORM).ini
PLATFORM_CHECKOUT_CMD := $(shell if [ -f $(PLATFORM_CHECKOUT_FILE) ]; then PLATFORM_PATH=$(PLATFORM_PATH) j2 $(PLATFORM_CHECKOUT)/template.j2 $(PLATFORM_CHECKOUT_FILE); fi)
MAKE_WITH_RETRY := ./scripts/run_with_retry $(MAKE)

%::
@echo "+++ --- Making $@ --- +++"
ifeq ($(NOJESSIE), 0)
EXTRA_DOCKER_TARGETS=$(notdir $@) make -f Makefile.work jessie
$(MAKE_WITH_RETRY) EXTRA_DOCKER_TARGETS=$(notdir $@) -f Makefile.work jessie
endif
ifeq ($(NOSTRETCH), 0)
EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=stretch make -f Makefile.work stretch
$(MAKE_WITH_RETRY) EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=stretch -f Makefile.work stretch
endif
BLDENV=buster make -f Makefile.work $@
$(MAKE_WITH_RETRY) BLDENV=buster -f Makefile.work $@

jessie:
@echo "+++ Making $@ +++"
Expand Down
23 changes: 12 additions & 11 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,30 +166,31 @@ stages:
pool:
vmImage: 'ubuntu-20.04'
displayName: "kvmtest-t0 by TestbedV2"
timeoutInMinutes: 1080
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: false
steps:
- 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)
MGMT_BRANCH: 202012

- job: t0_2vlans_testbedv2
pool:
vmImage: 'ubuntu-20.04'
displayName: "kvmtest-t0-2vlans by TestbedV2"
timeoutInMinutes: 1080
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: false
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
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"
MGMT_BRANCH: 202012

Expand Down Expand Up @@ -243,15 +244,15 @@ stages:
pool:
vmImage: 'ubuntu-20.04'
displayName: "kvmtest-t1-lag by TestbedV2"
timeoutInMinutes: 600
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: false
steps:
- 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)
MGMT_BRANCH: 202012

- job:
Expand Down Expand Up @@ -285,14 +286,14 @@ stages:
pool:
vmImage: 'ubuntu-20.04'
displayName: "kvmtest-dualtor-t0 by TestbedV2"
timeoutInMinutes: 1080
timeoutInMinutes: 240
condition: and(succeeded(), eq(variables.BUILD_IMG_RUN_TESTBEDV2_TEST, 'YES'))
continueOnError: false
steps:
- 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 "
MGMT_BRANCH: 202012
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{% for port_idx in range(0,32) %}
{% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %}
{% endfor %}
{%- endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{% for port_idx in range(0,32) %}
{% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %}
{% endfor %}
{%- endmacro %}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1d9d2f8

Please sign in to comment.