Skip to content

Commit

Permalink
Merge branch 'master' into dev-reset-local-users-password
Browse files Browse the repository at this point in the history
  • Loading branch information
azmyali98 committed Dec 16, 2024
2 parents f5ea07d + 8063384 commit 657df13
Show file tree
Hide file tree
Showing 3,083 changed files with 606,338 additions and 59,648 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
21 changes: 20 additions & 1 deletion .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
docker_syncd_rpc_image: no
syncd_rpc_image: no
platform_rpc: no
ss_image: no
${{ if parameters.qemuOrCrossBuild }}:
SONIC_SLAVE_DOCKER_DRIVER: 'vfs'
CACHE_MODE: 'none'
Expand Down Expand Up @@ -81,7 +82,7 @@ jobs:
variables:
dbg_image: yes

- name: innovium
- name: marvell-teralynx
variables:
dbg_image: yes

Expand All @@ -106,6 +107,7 @@ jobs:
- name: mellanox
variables:
dbg_image: yes
ss_image: yes
docker_syncd_rpc_image: yes
syncd_rpc_image: yes
platform_rpc: mlnx
Expand Down Expand Up @@ -162,6 +164,10 @@ jobs:
make $BUILD_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-$(GROUP_NAME).bin
mv target/sonic-$(GROUP_NAME).bin target/sonic-$(GROUP_NAME)-dbg.bin
fi
if [ $(ss_image) == yes ]; then
make $BUILD_OPTIONS SMARTSWITCH=1 INCLUDE_DHCP_SERVER=y target/sonic-$(GROUP_NAME).bin
mv target/sonic-$(GROUP_NAME).bin target/sonic-$(GROUP_NAME)-smartswitch.bin
fi
if [ $(swi_image) == yes ]; then
make $BUILD_OPTIONS ENABLE_IMAGE_SIGNATURE=y target/sonic-aboot-$(GROUP_NAME).swi
fi
Expand All @@ -182,7 +188,20 @@ jobs:
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/sonic-$(GROUP_NAME).bin
mv target/sonic-mellanox.bin target/sonic-$(GROUP_NAME)-rpc.bin
fi
if [ $(GROUP_NAME) == nvidia-bluefield ]; then
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bfb
fi
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bin
fi
displayName: "Build sonic image"
- template: .azure-pipelines/check-dirty-version.yml@buildimage
- task: ManifestGeneratorTask@0
condition: ne(variables.SKIP_MG, 'y')
timeoutInMinutes: 60
continueOnError: true
displayName: "Manifest Generator"
inputs:
BuildDropPath: '$(System.DefaultWorkingDirectory)/target/'
ManifestDirPath: 'target/'
BuildComponentPath: $(System.DefaultWorkingDirectory)/src/

25 changes: 24 additions & 1 deletion .azure-pipelines/azure-pipelines-image-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
fetchDepth: 0
condition: and(succeeded(), eq(variables.SKIP_CHECKOUT, ''))
displayName: 'Checkout code'
- script: |
set -x
sudo setfacl -R -b $(Agent.BuildDirectory)
displayName: 'setfacl'
- script: |
BRANCH_NAME=$(Build.SourceBranchName)
[ -n "$SYSTEM_PULLREQUEST_PULLREQUESTID" ] && BRANCH_NAME="$SYSTEM_PULLREQUEST_TARGETBRANCH-$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER"
Expand All @@ -54,9 +58,28 @@ jobs:
displayName: 'Make configure'
postSteps:
- script: |
BUILD_REASON=$(Build.Reason)
echo "Build.Reason = $BUILD_REASON"
echo "Build.DefinitionName = $BUILD_DEFINITIONNAME"
if [[ "$BUILD_REASON" != "PullRequest" && "$BUILD_DEFINITIONNAME" == "Azure.sonic-buildimage.official.vs" ]]
then
PORT=443
DOCKERS=$(ls target/docker-ptf.gz)
BRANCH=$(Build.SourceBranchName)
echo "Branch = $BRANCH"
LABELS="$BRANCH"
[[ "$BRANCH" == "master" ]] && LABELS="$LABELS latest"
for f in $DOCKERS; do
echo $f
echo "Labels = $LABELS"
./push_docker.sh $f $(REGISTRY_SERVER_PUBLIC) $PORT $(REGISTRY_USERNAME) "$REGISTRY_PASSWD" "$LABELS"
done
fi
mkdir -p $(Build.ArtifactStagingDirectory)/target
mv target/* $(Build.ArtifactStagingDirectory)/target/
displayName: Copy Artifacts
env:
REGISTRY_PASSWD: $(REGISTRY_PASSWD)
displayName: Publish to Docker Registry and Copy Artifacts
condition: always()
- publish: $(Build.ArtifactStagingDirectory)
artifact: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
Expand Down
1 change: 1 addition & 0 deletions .azure-pipelines/official-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ stages:
- stage: Build
pool: sonicbld-1es
variables:
- group: Container-Registry
- name: CACHE_MODE
value: wcache
- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml@buildimage
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/template-variables.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variables:
DEFAULT_CONTAINER_REGISTRY: 'publicmirror.azurecr.io'
COMMON_LIB_BUILD_ENVS: 'bullseye'
COMMON_LIB_BUILD_ENVS: 'bookworm'
SONIC_SLAVE_DOCKER_DRIVER: 'overlay2'
SONIC_BUILD_RETRY_COUNT: 3
SONIC_BUILD_RETRY_INTERVAL: 600
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/protect-file.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Protect certain files to avoid further changes

on:
push:
branches:
- 'master'
- '202[2-9][0-9][0-9]'
pull_request:
branches:
- 'master'
- '202[2-9][0-9][0-9]'

jobs:
check-file:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Fetch base branch
run: |
git fetch origin ${GITHUB_BASE_REF}
- name: Check protected files
run: |
echo "Starting file check step"
protected_files=('src/sonic-config-engine/minigraph.py' 'files/build_templates/init_cfg.json.j2')
base_branch=$(git rev-parse origin/${GITHUB_BASE_REF})
for protected_file in "${protected_files[@]}"; do
echo "Checking ${protected_file}"
if git diff --name-only $base_branch | grep -q "^${protected_file}\$"; then
echo "Error: You are trying to modify ${protected_file}, which is protected."
exit 1
fi
done
echo "No changes detected in protected files"
17 changes: 13 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
[submodule "src/sonic-frr/frr"]
path = src/sonic-frr/frr
url = https://github.com/sonic-net/sonic-frr.git
branch = frr/8.5
branch = frr-10.0.1
[submodule "platform/p4/p4-hlir/p4-hlir-v1.1"]
path = platform/p4/p4-hlir/p4-hlir-v1.1
url = https://github.com/p4lang/p4-hlir.git
Expand Down Expand Up @@ -106,6 +106,9 @@
[submodule "src/sonic-gnmi"]
path = src/sonic-gnmi
url = https://github.com/sonic-net/sonic-gnmi.git
[submodule "src/sonic-bmp"]
path = src/sonic-bmp
url = https://github.com/sonic-net/sonic-bmp.git
[submodule "src/sonic-genl-packet"]
path = src/sonic-genl-packet
url = https://github.com/sonic-net/sonic-genl-packet
Expand All @@ -121,6 +124,12 @@
[submodule "platform/marvell/sonic-platform-marvell"]
path = platform/marvell/sonic-platform-marvell
url = https://github.com/Marvell-switching/sonic-platform-arm64.git
[submodule "platform/innovium/sonic-platform-marvell"]
path = platform/innovium/sonic-platform-marvell
url = https://github.com/Marvell-switching/sonic-platform-marvell
[submodule "src/sonic-stp"]
path = src/sonic-stp
url = https://github.com/sonic-net/sonic-stp
[submodule "platform/marvell-teralynx/sonic-platform-marvell-teralynx"]
path = platform/marvell-teralynx/sonic-platform-marvell-teralynx
url = https://github.com/Marvell-switching/sonic-platform-marvell.git
[submodule "platform/vpp"]
path = platform/vpp
url = https://github.com/sonic-net/sonic-platform-vpp.git
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ endif
PLATFORM_PATH := platform/$(if $(PLATFORM),$(PLATFORM),$(CONFIGURED_PLATFORM))
PLATFORM_CHECKOUT := platform/checkout
PLATFORM_CHECKOUT_FILE := $(PLATFORM_CHECKOUT)/$(PLATFORM).ini
ifeq ($(SMARTSWITCH),1)
PLATFORM_CHECKOUT_FILE := $(PLATFORM_CHECKOUT)/$(PLATFORM)-smartswitch.ini
endif
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)

Expand Down
7 changes: 7 additions & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
# * SONIC_PTF_ENV_PY_VER: Python version for PTF image
# * Default: mixed
# * Values: mixed,py3
# * ENABLE_MULTIDB: Enable multiple redis database instances.
# * Default: unset
# * Values: y
###############################################################################

SHELL = /bin/bash
Expand Down Expand Up @@ -532,10 +535,12 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \
SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD=$(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD) \
SONIC_INCLUDE_SYSTEM_TELEMETRY=$(INCLUDE_SYSTEM_TELEMETRY) \
SONIC_INCLUDE_SYSTEM_GNMI=$(INCLUDE_SYSTEM_GNMI) \
SONIC_INCLUDE_SYSTEM_BMP=$(INCLUDE_SYSTEM_BMP) \
SONIC_INCLUDE_SYSTEM_EVENTD=$(INCLUDE_SYSTEM_EVENTD) \
INCLUDE_DHCP_RELAY=$(INCLUDE_DHCP_RELAY) \
INCLUDE_DHCP_SERVER=$(INCLUDE_DHCP_SERVER) \
INCLUDE_MACSEC=$(INCLUDE_MACSEC) \
INCLUDE_ICCPD=$(INCLUDE_ICCPD) \
SONIC_INCLUDE_RESTAPI=$(INCLUDE_RESTAPI) \
SONIC_INCLUDE_MUX=$(INCLUDE_MUX) \
ENABLE_TRANSLIB_WRITE=$(ENABLE_TRANSLIB_WRITE) \
Expand Down Expand Up @@ -567,8 +572,10 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \
ONIE_IMAGE_PART_SIZE=$(ONIE_IMAGE_PART_SIZE) \
SONIC_OS_VERSION=$(SONIC_OS_VERSION) \
PIP_HTTP_TIMEOUT=$(PIP_HTTP_TIMEOUT) \
BUILD_PROCESS_TIMEOUT=$(BUILD_PROCESS_TIMEOUT) \
LEGACY_SONIC_MGMT_DOCKER=$(LEGACY_SONIC_MGMT_DOCKER) \
SONIC_PTF_ENV_PY_VER=$(SONIC_PTF_ENV_PY_VER) \
ENABLE_MULTIDB=$(ENABLE_MULTIDB) \
$(SONIC_OVERRIDE_BUILD_VARS)

.PHONY: sonic-slave-build sonic-slave-bash init reset
Expand Down
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Broadcom](https://dev.azure.com/mssonic/build/_apis/build/status/broadcom/Azure.sonic-buildimage.official.broadcom?branchName=master&label=Broadcom)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=138&branchName=master)
[![Centec](https://dev.azure.com/mssonic/build/_apis/build/status/centec/Azure.sonic-buildimage.official.centec?branchName=master&label=Centec)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=143&branchName=master)
[![Centec(arm64)](https://dev.azure.com/mssonic/build/_apis/build/status/centec/Azure.sonic-buildimage.official.centec-arm64?branchName=master&label=Centec-arm64)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=140&branchName=master)
[![Innovium](https://dev.azure.com/mssonic/build/_apis/build/status/innovium/Azure.sonic-buildimage.official.innovium?branchName=master&label=Innovium)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=148&branchName=master)
[![Marvell-Teralynx](https://dev.azure.com/mssonic/build/_apis/build/status/marvell-teralynx/Azure.sonic-buildimage.official.marvell-teralynx?branchName=master&label=Marvell-Teralynx)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=148&branchName=master)
[![Mellanox](https://dev.azure.com/mssonic/build/_apis/build/status/mellanox/Azure.sonic-buildimage.official.mellanox?branchName=master&label=Mellanox)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=139&branchName=master)
[![Marvell(armhf)](https://dev.azure.com/mssonic/build/_apis/build/status/marvell/Azure.sonic-buildimage.official.marvell-armhf?branchName=master&label=Marvell-armhf)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=141&branchName=master)
[![Marvell(arm64)](https://dev.azure.com/mssonic/build/_apis/build/status/marvell/Azure.sonic-buildimage.official.marvell-arm64?branchName=master&label=Marvell-arm64)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=999&branchName=master)
Expand All @@ -13,6 +13,20 @@

[![VS](https://dev.azure.com/mssonic/build/_apis/build/status/vs/Azure.sonic-buildimage.official.vs?branchName=master&label=VS)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=142&branchName=master)

*202405 builds*:

[![Broadcom](https://dev.azure.com/mssonic/build/_apis/build/status/broadcom/Azure.sonic-buildimage.official.broadcom?branchName=202405&label=Broadcom)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=138&branchName=202405)
[![Centec](https://dev.azure.com/mssonic/build/_apis/build/status/centec/Azure.sonic-buildimage.official.centec?branchName=202405&label=Centec)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=143&branchName=202405)
[![Centec(arm64)](https://dev.azure.com/mssonic/build/_apis/build/status/centec/Azure.sonic-buildimage.official.centec-arm64?branchName=202405&label=Centec-arm64)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=140&branchName=202405)
[![Innovium](https://dev.azure.com/mssonic/build/_apis/build/status/innovium/Azure.sonic-buildimage.official.innovium?branchName=202405&label=Innovium)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=148&branchName=202405)
[![Mellanox](https://dev.azure.com/mssonic/build/_apis/build/status/mellanox/Azure.sonic-buildimage.official.mellanox?branchName=202405&label=Mellanox)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=139&branchName=202405)
[![Marvell(armhf)](https://dev.azure.com/mssonic/build/_apis/build/status/marvell/Azure.sonic-buildimage.official.marvell-armhf?branchName=202405&label=Marvell-armhf)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=141&branchName=202405)
[![Marvell(arm64)](https://dev.azure.com/mssonic/build/_apis/build/status/marvell/Azure.sonic-buildimage.official.marvell-arm64?branchName=202405&label=Marvell-arm64)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=999&branchName=202405)
[![Nephos](https://dev.azure.com/mssonic/build/_apis/build/status/nephos/Azure.sonic-buildimage.official.nephos?branchName=202405&label=Nephos)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=149&branchName=202405)
[![Nvidia-Bluefield](https://dev.azure.com/mssonic/build/_apis/build/status/nvidia/Azure.sonic-buildimage.official.nvidia-bluefield?branchName=202405&label=Nvidia-Bluefield)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=1665&branchName=202405)
[![Pensando](https://dev.azure.com/mssonic/build/_apis/build/status/pensando/Azure.sonic-buildimage.official.pensando?branchName=202405&label=Pensando)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=1366&branchName=202405)
[![VS](https://dev.azure.com/mssonic/build/_apis/build/status/vs/Azure.sonic-buildimage.official.vs?branchName=202405&label=VS)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=142&branchName=202405)

*202311 builds*:

[![Broadcom](https://dev.azure.com/mssonic/build/_apis/build/status/broadcom/Azure.sonic-buildimage.official.broadcom?branchName=202311&label=Broadcom)](https://dev.azure.com/mssonic/build/_build/latest?definitionId=138&branchName=202311)
Expand Down Expand Up @@ -201,7 +215,7 @@ The supported ASIC vendors are:
* PLATFORM=centec
* PLATFORM=nephos
* PLATFORM=nvidia-bluefield
* PLATFORM=innovium
* PLATFORM=marvell-teralynx
* PLATFORM=vs

## Usage for ARM Architecture
Expand Down Expand Up @@ -359,8 +373,8 @@ on the SAI version for each SONiC release.
and Mellanox switch ASIC (gzip tar archive)
* docker-syncd-nephos.gz: docker image for the daemon to sync database
and Nephos switch ASIC (gzip tar archive)
* docker-syncd-invm.gz: docker image for the daemon to sync database
and Innovium switch ASIC (gzip tar archive)
* docker-syncd-mrvl-teralynx.gz: docker image for the daemon to sync database
and Marvell-Teralynx switch ASIC (gzip tar archive)
* docker-sonic-p4.gz: docker image for all-in-one for p4 software switch
(gzip tar archive)
* docker-sonic-vs.gz: docker image for all-in-one for software virtual switch
Expand Down
34 changes: 18 additions & 16 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ stages:
- name: broadcom
variables:
swi_image: yes
docker_syncd_rpc_image: yes
platform_rpc: brcm
INCLUDE_RESTAPI: y
- name: mellanox
variables:
Expand Down Expand Up @@ -295,22 +297,22 @@ stages:
MGMT_BRANCH: $(BUILD_BRANCH)
TEST_SET: onboarding_t1

- job: onboarding_elastictest_dualtor
displayName: "onboarding dualtor testcases by Elastictest - optional"
timeoutInMinutes: 240
continueOnError: true
pool: sonic-ubuntu-1c
steps:
- template: .azure-pipelines/run-test-elastictest-template.yml@sonic-mgmt
parameters:
TOPOLOGY: dualtor
STOP_ON_FAILURE: "False"
RETRY_TIMES: 0
MIN_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
MAX_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
MGMT_BRANCH: $(BUILD_BRANCH)
TEST_SET: onboarding_dualtor
# - job: onboarding_elastictest_dualtor
# displayName: "onboarding dualtor testcases by Elastictest - optional"
# timeoutInMinutes: 240
# continueOnError: true
# pool: sonic-ubuntu-1c
# steps:
# - template: .azure-pipelines/run-test-elastictest-template.yml@sonic-mgmt
# parameters:
# TOPOLOGY: dualtor
# STOP_ON_FAILURE: "False"
# RETRY_TIMES: 0
# MIN_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
# MAX_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
# KVM_IMAGE_BRANCH: $(BUILD_BRANCH)
# MGMT_BRANCH: $(BUILD_BRANCH)
# TEST_SET: onboarding_dualtor

# - job: wan_elastictest
# displayName: "kvmtest-wan by Elastictest"
Expand Down
3 changes: 2 additions & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CONFIGURED_ARCH=$([ -f .arch ] && cat .arch || echo amd64)
## docker engine version (with platform)
DOCKER_VERSION=5:24.0.2-1~debian.12~$IMAGE_DISTRO
CONTAINERD_IO_VERSION=1.6.21-1
LINUX_KERNEL_VERSION=6.1.0-11-2
LINUX_KERNEL_VERSION=6.1.0-22-2

## Working directory to prepare the file system
FILESYSTEM_ROOT=./fsroot
Expand Down Expand Up @@ -364,6 +364,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
mtr-tiny \
locales \
cgroup-tools \
ipmitool \
ndisc6 \
makedumpfile \
conntrack \
Expand Down
Loading

0 comments on commit 657df13

Please sign in to comment.