Skip to content

Commit f1f9c87

Browse files
azmy98azmyali98
authored andcommitted
Merge branch 'master' into dev-reset-local-users-password
2 parents 6bb6a32 + 99ec0f3 commit f1f9c87

File tree

2,588 files changed

+145358
-216550
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,588 files changed

+145358
-216550
lines changed

.azure-pipelines/azure-pipelines-UpgrateVersion.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@ parameters:
3333
type: object
3434
default:
3535
- vs
36-
- barefoot
3736
- broadcom
3837
- centec
3938
- centec-arm64
4039
- generic
4140
- marvell-armhf
41+
- marvell-arm64
4242
- mellanox
43+
- pensando
4344

4445
stages:
4546
- stage: Prepare
@@ -161,8 +162,8 @@ stages:
161162
git branch -u remote/$BRANCH_NAME
162163
163164
echo $GIT_PASSWORD | gh auth login --with-token
164-
TITLE="Upgrade SONiC Versions"
165-
BODY="Upgrade SONiC Versions"
165+
TITLE="[${SOURCE_BRANCH#refs/heads/}] Upgrade SONiC package Versions"
166+
BODY=$TITLE
166167
RET=0
167168
if ! gh pr create -t "$TITLE" -b "$BODY" -B $(Build.SourceBranch) -R $(Build.Repository.Name) > pr.log 2>&1; then
168169
if ! grep -q "already exists" pr.log; then

.azure-pipelines/azure-pipelines-build-ubuntu-2004.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ trigger:
99
branches:
1010
include:
1111
- master
12+
- 202???
13+
14+
schedules:
15+
- cron: "0 0 * * *"
16+
displayName: Daily build
17+
branches:
18+
include:
19+
- master
20+
- 202???
21+
always: true
1222

1323
stages:
1424
- stage: Build
@@ -28,13 +38,15 @@ stages:
2838
cmake pkg-config python3-pip python cmake libgtest-dev libgmock-dev libyang-dev \
2939
debhelper-compat dh-elpa dh-sequence-python3 python3-all \
3040
libpython3-all-dev python3-six xmlto unzip rake-compiler gem2deb pkg-php-tools \
31-
ant default-jdk maven-repo-helper libguava-java
41+
ant default-jdk maven-repo-helper libguava-java \
42+
libboost-all-dev libgtest-dev build-essential swig4.0 swig
43+
sudo pip3 install pytest click
3244
wget http://ftp.us.debian.org/debian/pool/main/libg/libgoogle-gson-java/libgoogle-gson-java_2.8.6-1+deb11u1_all.deb
3345
sudo dpkg -i libgoogle-gson-java_2.8.6-1+deb11u1_all.deb
3446
mkdir -p /tmp/artifacts
3547
displayName: "Install dependencies"
3648
- script: |
37-
SONIC_CONFIG_MAKE_JOBS=$(nproc) CONFIGURED_ARCH=amd64 DEST=/tmp/artifacts make -f ../rules/protobuf.mk -f protobuf/Makefile
49+
BLDENV=bullseye SONIC_CONFIG_MAKE_JOBS=$(nproc) CONFIGURED_ARCH=amd64 DEST=/tmp/artifacts make -f ../rules/protobuf.mk -f protobuf/Makefile
3850
workingDirectory: src
3951
displayName: "Build protobuf"
4052
- script: |

.azure-pipelines/azure-pipelines-build.yml

+17-9
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
dbg_image: no
3636
asan_image: no
3737
swi_image: no
38-
raw_image: no
3938
docker_syncd_rpc_image: no
4039
syncd_rpc_image: no
4140
platform_rpc: no
@@ -62,7 +61,6 @@ jobs:
6261
variables:
6362
dbg_image: yes
6463
swi_image: yes
65-
raw_image: yes
6664
docker_syncd_rpc_image: yes
6765
platform_rpc: brcm
6866

@@ -92,13 +90,15 @@ jobs:
9290
pool: sonicbld-armhf
9391
timeoutInMinutes: 2880
9492
variables:
93+
PLATFORM_NAME: marvell
9594
PLATFORM_ARCH: armhf
9695

9796
- name: marvell-arm64
9897
${{ if not(parameters.qemuOrCrossBuild) }}:
9998
pool: sonicbld-arm64
10099
timeoutInMinutes: 2880
101100
variables:
101+
PLATFORM_NAME: marvell
102102
PLATFORM_ARCH: arm64
103103

104104
- name: marvell
@@ -116,12 +116,19 @@ jobs:
116116
docker_syncd_rpc_image: yes
117117
platform_rpc: nephos
118118

119+
- name: pensando
120+
pool: sonicbld-arm64
121+
variables:
122+
PLATFORM_ARCH: arm64
123+
119124
buildSteps:
120125
- template: .azure-pipelines/template-skipvstest.yml@buildimage
121126
- template: .azure-pipelines/template-daemon.yml@buildimage
122127
- bash: |
123128
set -ex
124-
if [ $(GROUP_NAME) == vs ]; then
129+
if [ $(GROUP_NAME) == pensando ]; then
130+
make $BUILD_OPTIONS target/sonic-pensando.tar
131+
elif [ $(GROUP_NAME) == vs ]; then
125132
if [ $(dbg_image) == yes ]; then
126133
make $BUILD_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-vs.img.gz
127134
mv target/sonic-vs.img.gz target/sonic-vs-dbg.img.gz
@@ -130,9 +137,13 @@ jobs:
130137
make $BUILD_OPTIONS ENABLE_ASAN=y target/docker-sonic-vs.gz
131138
mv target/docker-sonic-vs.gz target/docker-sonic-vs-asan.gz
132139
fi
133-
if [ $(K8S_OPTIONS) == 'INCLUDE_KUBERNETES_MASTER=y' ]; then
134-
make $BUILD_OPTIONS $(K8S_OPTIONS) target/sonic-vs.img.gz
135-
mv target/sonic-vs.img.gz target/sonic-vs-k8s.img.gz
140+
if [ "$(K8S_MASTER_CHANGED)" == 'YES' ]; then
141+
make $BUILD_OPTIONS INCLUDE_KUBERNETES_MASTER=y target/sonic-vs.img.gz
142+
gzip -d target/sonic-vs.img.gz
143+
SONIC_RUN_CMDS="qemu-img convert target/sonic-vs.img -O vhdx -o subformat=dynamic target/sonic-vs.vhdx" make $BUILD_OPTIONS sonic-slave-run
144+
gzip target/sonic-vs.vhdx
145+
mv target/sonic-vs.vhdx.gz target/sonic-vs-k8s.vhdx.gz
146+
rm target/sonic-vs.img
136147
fi
137148
make $BUILD_OPTIONS target/docker-sonic-vs.gz target/sonic-vs.img.gz target/docker-ptf.gz
138149
make $BUILD_OPTIONS target/docker-ptf-sai.gz
@@ -149,9 +160,6 @@ jobs:
149160
if [ $(swi_image) == yes ]; then
150161
make $BUILD_OPTIONS ENABLE_IMAGE_SIGNATURE=y target/sonic-aboot-$(GROUP_NAME).swi
151162
fi
152-
if [ $(raw_image) == yes ]; then
153-
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).raw
154-
fi
155163
if [ $(docker_syncd_rpc_image) == yes ]; then
156164
# workaround for issue in rules/sairedis.dep, git ls-files will list un-exist files for cache
157165
make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/docker-syncd-$(platform_rpc)-rpc.gz

.azure-pipelines/azure-pipelines-image-template.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- script: |
3131
[ -n "$OVERRIDE_BUILD_OPTIONS" ] && OVERRIDE_BUILD_OPTIONS=$(OVERRIDE_BUILD_OPTIONS)
3232
BUILD_OPTIONS="$(BUILD_OPTIONS) $OVERRIDE_BUILD_OPTIONS"
33-
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox|marvell-armhf)$"; then
33+
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox|marvell-armhf|marvell-arm64)$"; then
3434
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM_AZP)"
3535
BUILD_OPTIONS="$BUILD_OPTIONS $CACHE_OPTIONS"
3636
fi
@@ -49,7 +49,8 @@ jobs:
4949
sudo modprobe overlay
5050
sudo apt-get install -y acl
5151
sudo bash -c "echo 1 > /proc/sys/vm/compact_memory"
52-
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure
52+
[ -z "$PLATFORM_NAME" ] && PLATFORM_NAME=$(PLATFORM_AZP)
53+
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$PLATFORM_NAME PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure
5354
displayName: 'Make configure'
5455
postSteps:
5556
- script: |

.azure-pipelines/build-template.yml

-3
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ jobs:
101101
if [ ${{ parameters.swi_image }} == true ]; then
102102
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) ENABLE_IMAGE_SIGNATURE=y target/sonic-aboot-${{ parameters.platform }}.swi
103103
fi
104-
if [ ${{ parameters.raw_image }} == true ]; then
105-
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) target/sonic-${{ parameters.platform }}.raw
106-
fi
107104
if [ ${{ parameters.sync_rpc_image }} == true ]; then
108105
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) ENABLE_SYNCD_RPC=y target/docker-syncd-${{ parameters.platform_short }}-rpc.gz
109106
# workaround for issue in rules/sairedis.dep, git ls-files will list un-exist files for cache
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Starter pipeline
2+
# Start with a minimal pipeline that you can customize to build and deploy your code.
3+
# Add steps that build, run tests, deploy, and more:
4+
# https://aka.ms/yaml
5+
# Build and push sonic-mgmt image
6+
7+
schedules:
8+
- cron: "0 8 * * *"
9+
branches:
10+
include:
11+
- master
12+
always: true
13+
14+
trigger: none
15+
pr:
16+
branches:
17+
include:
18+
- master
19+
paths:
20+
include:
21+
- dockers/docker-sonic-mgmt
22+
23+
parameters:
24+
- name: registry_url
25+
type: string
26+
default: sonicdev-microsoft.azurecr.io
27+
- name: registry_conn
28+
type: string
29+
default: sonicdev
30+
31+
stages:
32+
- stage: Build
33+
jobs:
34+
- job: Build
35+
pool: sonicbld
36+
timeoutInMinutes: 360
37+
steps:
38+
- template: cleanup.yml
39+
- checkout: self
40+
clean: true
41+
- bash: |
42+
set -xe
43+
git submodule update --init --recursive -- src/sonic-platform-daemons src/sonic-genl-packet src/sonic-sairedis src/ptf src/sonic-device-data
44+
45+
make SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic
46+
make -f Makefile.work BLDENV=bullseye SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y LEGACY_SONIC_MGMT_DOCKER=n target/docker-sonic-mgmt.gz
47+
cp target -r $(Build.ArtifactStagingDirectory)/target
48+
docker load -i target/docker-sonic-mgmt.gz
49+
docker tag docker-sonic-mgmt $REGISTRY_SERVER/docker-sonic-mgmt:py3only
50+
env:
51+
REGISTRY_SERVER: ${{ parameters.registry_url }}
52+
displayName: Build docker-sonic-mgmt.gz
53+
- task: Docker@2
54+
displayName: Upload image
55+
inputs:
56+
containerRegistry: ${{ parameters.registry_conn }}
57+
repository: docker-sonic-mgmt
58+
command: push
59+
tags: py3only
60+
- publish: $(Build.ArtifactStagingDirectory)
61+
artifact: 'docker-sonic-mgmt'
62+
displayName: "Archive docker image sonic-mgmt"
63+

.azure-pipelines/docker-sonic-mgmt.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ stages:
4343
git submodule update --init --recursive -- src/sonic-platform-daemons src/sonic-genl-packet src/sonic-sairedis src/ptf src/sonic-device-data
4444
4545
make SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic
46-
make SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y target/docker-sonic-mgmt.gz
46+
make -f Makefile.work BLDENV=bullseye SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y LEGACY_SONIC_MGMT_DOCKER=y target/docker-sonic-mgmt.gz
4747
cp target -r $(Build.ArtifactStagingDirectory)/target
4848
docker load -i target/docker-sonic-mgmt.gz
4949
docker tag docker-sonic-mgmt $REGISTRY_SERVER/docker-sonic-mgmt:latest

.azure-pipelines/docker-sonic-slave-template.yml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ parameters:
1616
- name: dist
1717
type: string
1818
values:
19+
- bookworm
1920
- bullseye
2021
- buster
2122
- stretch

.azure-pipelines/docker-sonic-slave.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ resources:
88
- repository: buildimage
99
type: github
1010
name: sonic-net/sonic-buildimage
11-
ref: master
11+
ref: bookworm
1212
endpoint: sonic-net
1313

1414
schedules:
@@ -44,6 +44,7 @@ parameters:
4444
- name: 'dists'
4545
type: object
4646
default:
47+
- bookworm
4748
- bullseye
4849
- buster
4950
- stretch

.azure-pipelines/dpkg-cache-cleanup.yml

+24-3
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,34 @@ trigger: none
1515
pr: none
1616

1717
jobs:
18-
- job: Build
18+
- job: Amd
1919
pool: sonicbld
2020
timeoutInMinutes: 5
2121
steps:
2222
- checkout: none
2323
- script: |
24-
set -xe
24+
df -h
2525
sudo find /nfs/dpkg_cache/ -name *.tgz -mtime +30 -type f -delete
26+
df -h
2627
displayName: clean dpkg cache
27-
28+
- job: Armhf
29+
pool: sonicbld-armhf
30+
timeoutInMinutes: 5
31+
steps:
32+
- checkout: none
33+
- script: |
34+
df -h
35+
sudo find /nfs/dpkg_cache/ -name *.tgz -mtime +30 -type f -delete
36+
df -h
37+
displayName: clean dpkg cache
38+
- job: Arm64
39+
pool: sonicbld-arm64
40+
timeoutInMinutes: 5
41+
steps:
42+
- checkout: none
43+
- script: |
44+
df -h
45+
sudo find /nfs/dpkg_cache/ -name *.tgz -mtime +30 -type f -delete
46+
df -h
47+
displayName: clean dpkg cache
48+

.azure-pipelines/official-build-cache.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ stages:
3939
- name: broadcom
4040
variables:
4141
swi_image: yes
42-
raw_image: yes
4342
docker_syncd_rpc_image: yes
4443
platform_rpc: brcm
4544
- name: mellanox
@@ -50,4 +49,5 @@ stages:
5049
pool: sonicbld-armhf
5150
timeoutInMinutes: 1200
5251
variables:
52+
PLATFORM_NAME: marvell
5353
PLATFORM_ARCH: armhf

.azure-pipelines/template-skipvstest.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@ steps:
44
set -ex
55
tar_branch=origin/$(System.PullRequest.TargetBranchName)
66
# Check if k8s master entrance script is changed
7-
if ! git diff $tar_branch..HEAD --name-only | grep -F files/image_config/kubernetes/kubernetes_master_entrance.sh; then
8-
echo "##vso[task.setvariable variable=K8S_OPTIONS;]INCLUDE_KUBERNETES_MASTER=n"
9-
else
10-
echo "##vso[task.setvariable variable=K8S_OPTIONS;]INCLUDE_KUBERNETES_MASTER=y"
7+
K8S_MASTER_CHANGED=NO
8+
if git diff $tar_branch..HEAD --name-only | grep -F files/image_config/kubernetes/kubernetes_master_entrance.sh; then
9+
K8S_MASTER_CHANGED=YES
1110
fi
11+
set +x
12+
echo "##vso[task.setvariable variable=K8S_MASTER_CHANGED;]$K8S_MASTER_CHANGED"
13+
displayName: "Check if k8s master image build is needed."
14+
- script: |
15+
set -ex
16+
tar_branch=origin/$(System.PullRequest.TargetBranchName)
1217
git diff $tar_branch..HEAD --name-only | grep -v -f .azure-pipelines/vstest-exclude && exit 0
1318
git diff $tar_branch..HEAD --name-only | grep -f .azure-pipelines/vstest-include && exit 0
1419
set +x

.github/workflows/automerge.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ on:
99

1010
jobs:
1111
automerge:
12-
if: github.event.check_suite.app.name == 'Azure Pipelines' && github.event.check_suite.conclusion == 'success'
12+
# Disable workflow. Use automerge_scan instead to have the same behaviour.
13+
if: github.event.check_suite.app.name == 'Azure Pipelines' && github.event.check_suite.conclusion == 'success' && false
1314
runs-on: ubuntu-latest
1415
steps:
1516
- name: automerge

0 commit comments

Comments
 (0)