Skip to content

Commit 19c4542

Browse files
committed
Merged PR 6004325: Manual merge github master to internal
Related work items: #49, #58, #107, sonic-net#247, sonic-net#249, sonic-net#277, sonic-net#593, sonic-net#597, sonic-net#1035, sonic-net#2130, sonic-net#2150, sonic-net#2165, sonic-net#2169, sonic-net#2178, sonic-net#2179, sonic-net#2187, sonic-net#2188, sonic-net#2191, sonic-net#2195, sonic-net#2197, sonic-net#2198, sonic-net#2200, sonic-net#2202, sonic-net#2206, sonic-net#2209, sonic-net#2211, sonic-net#2216, sonic-net#7909, sonic-net#8927, sonic-net#9681, sonic-net#9733, sonic-net#9746, sonic-net#9850, sonic-net#9967, sonic-net#10104, sonic-net#10152, sonic-net#10168, sonic-net#10228, sonic-net#10266, sonic-net#10288, sonic-net#10294, sonic-net#10313, sonic-net#10394, sonic-net#10403, sonic-net#10404, sonic-net#10421, sonic-net#10431, sonic-net#10437, sonic-net#10445, sonic-net#10457, sonic-net#10458, sonic-net#10465, sonic-net#10467, sonic-net#10469, sonic-net#10470, sonic-net#10474, sonic-net#10477, sonic-net#10478, sonic-net#10482, sonic-net#10485, sonic-net#10488, sonic-net#10489, sonic-net#10492, sonic-net#10494, sonic-net#10498, sonic-net#10501, sonic-net#10509, sonic-net#10512, sonic-net#10514, sonic-net#10516, sonic-net#10517, sonic-net#10523, sonic-net#10525, sonic-net#10531, sonic-net#10532, sonic-net#10538, sonic-net#10555, sonic-net#10557, sonic-net#10559, sonic-net#10561, sonic-net#10565, sonic-net#10572, sonic-net#10574, sonic-net#10576, sonic-net#10578, sonic-net#10581, sonic-net#10585, sonic-net#10587, sonic-net#10599, sonic-net#10607, sonic-net#10611, sonic-net#10616, sonic-net#10618, sonic-net#10619, sonic-net#10623, sonic-net#10624, sonic-net#10633, sonic-net#10646, sonic-net#10655, sonic-net#10660, sonic-net#10664, sonic-net#10680, sonic-net#10683
2 parents b969fa5 + 96a2d79 commit 19c4542

208 files changed

Lines changed: 10226 additions & 1507 deletions

File tree

Some content is hidden

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

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ parameters:
3838
- centec
3939
- centec-arm64
4040
- generic
41-
- innovium
4241
- marvell-armhf
4342
- mellanox
4443

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
swi_image: yes
5151

5252
- name: broadcom
53+
timeoutInMinutes: 1440
5354
variables:
5455
dbg_image: yes
5556
swi_image: yes
@@ -131,3 +132,4 @@ jobs:
131132
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bin
132133
fi
133134
displayName: "Build sonic image"
135+
- template: check-dirty-version.yml
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
parameters:
2+
- name: connectionName
3+
type: string
4+
default: sonic-dev-connection
5+
- name: kevaultName
6+
type: string
7+
default: sonic-kv
8+
- name: certificateName
9+
type: string
10+
default: sonic-secure-boot
11+
12+
steps:
13+
- task: AzureKeyVault@2
14+
inputs:
15+
connectedServiceName: ${{ parameters.connectionName }}
16+
keyVaultName: ${{ parameters.kevaultName }}
17+
secretsFilter: ${{ parameters.certificateName }}
18+
19+
- script: |
20+
set -e
21+
TMP_FILE=$(mktemp)
22+
echo "$CERTIFICATE" | base64 -d > $TMP_FILE
23+
sudo mkdir -p /etc/certificates
24+
mkdir -p $(Build.StagingDirectory)/target
25+
# Save the public key
26+
openssl pkcs12 -in $TMP_FILE -clcerts --nokeys -nodes -passin pass: | sed -z -e "s/.*\(-----BEGIN CERTIFICATE\)/\1/" > $(SIGNING_CERT)
27+
# Save the private key
28+
openssl pkcs12 -in $TMP_FILE -nocerts -nodes -passin pass: | sed -z -e "s/.*\(-----BEGIN PRIVATE KEY\)/\1/" | sudo tee $(SIGNING_KEY) 1>/dev/null
29+
ls -lt $(SIGNING_CERT) $(SIGNING_KEY)
30+
rm $TMP_FILE
31+
env:
32+
CERTIFICATE: $(${{ parameters.certificateName }})
33+
displayName: "Save certificate"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
steps:
2+
- script: |
3+
. functions.sh
4+
SONIC_VERSION=$(sonic_get_version)
5+
echo "SONIC_VERSION=$SONIC_VERSION"
6+
if [[ "$SONIC_VERSION" == *dirty* ]]; then
7+
# Print the detail dirty info
8+
git status --untracked-files=no -s --ignore-submodules
9+
10+
# Exit with error, if it is a PR build
11+
if [ "$(Build.Reason)" == "PullRequest" ]; then
12+
echo "Build failed for the dirty version: $SONIC_VERSION" 1>&2
13+
exit 1
14+
fi
15+
fi
16+
displayName: "Check the dirty version"

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,13 @@ jobs:
101101
containerRegistry: ${{ parameters.registry_conn }}
102102
repository: $(VARIABLE_SLAVE_BASE_IMAGE)
103103
command: push
104-
tags: |
105-
$(VARIABLE_SLAVE_BASE_TAG)
106-
${{ if eq(variables['Build.SourceBranchName'], 'master') }}:
104+
${{ if eq(variables['Build.SourceBranchName'], 'master') }}:
105+
tags: |
106+
$(VARIABLE_SLAVE_BASE_TAG)
107107
latest
108+
${{ else }}:
109+
tags: |
110+
$(VARIABLE_SLAVE_BASE_TAG)
108111
- ${{ if ne(parameters.arch, 'amd64') }}:
109112
- task: Docker@2
110113
condition: ne(variables['Build.Reason'], 'PullRequest')

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ stages:
6060
- ${{ each dist in parameters.dists }}:
6161
- ${{ if endswith(variables['Build.DefinitionName'], dist) }}:
6262
- ${{ each arch in parameters.arches }}:
63-
- ${{ if eq(variables['System.PullRequest.TargetBranch'], 'master') }}:
63+
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
6464
- template: docker-sonic-slave-template.yml
6565
parameters:
6666
pool: sonicbld

.azure-pipelines/official-build-cisco-8000.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,17 @@ resources:
2222
name: Cisco-8000-sonic/platform-cisco-8000
2323
endpoint: cisco-connection
2424

25+
2526
variables:
2627
- group: SONIC-AKV-STROAGE-1
2728
- name: StorageSASKey
2829
value: $(sonicstorage-SasToken)
30+
- name: SONIC_ENABLE_SECUREBOOT_SIGNATURE
31+
value: y
32+
- name: SIGNING_KEY
33+
value: /etc/certificates/sonic-secure-boot-private.pem
34+
- name: SIGNING_CERT
35+
value: $(Build.StagingDirectory)/target/sonic-secure-boot-public.pem
2936

3037
stages:
3138
- stage: Build
@@ -41,6 +48,7 @@ stages:
4148
parameters:
4249
buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) ${{ variables.VERSION_CONTROL_OPTIONS }}'
4350
preSteps:
51+
- template: azure-pipelines-download-certificate.yml
4452
- checkout: self
4553
submodules: recursive
4654
path: s
@@ -90,5 +98,10 @@ stages:
9098
StorageSASKey: $(StorageSASKey)
9199
condition: ne(variables['Build.Reason'], 'PullRequest')
92100
displayName: "Override cisco sai packages"
101+
- script: |
102+
echo "SONIC_ENABLE_SECUREBOOT_SIGNATURE := y" >> rules/config.user
103+
echo "SIGNING_KEY := $(SIGNING_KEY)" >> rules/config.user
104+
echo "SIGNING_CERT := $(SIGNING_CERT)" >> rules/config.user
105+
displayName: "Enable secure boot signature"
93106
jobGroups:
94107
- name: cisco-8000

.azure-pipelines/template-commonlib.yml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,39 @@ jobs:
22
- job: Build
33
timeoutInMinutes: 120
44
pool: sonicbld
5+
variables:
6+
- template: template-variables.yml
57
steps:
68
- checkout: self
79
clean: true
810
submodules: recursive
911
- script: |
1012
set -ex
11-
case $(Build.SourceBranchName) in
12-
202012 | 202106)
13-
bldenv=buster
14-
;;
15-
*)
16-
bldenv=bullseye
17-
;;
18-
esac
19-
BLDENV=$bldenv make -f Makefile.work configure PLATFORM=vs ENABLE_DOCKER_BASE_PULL=y
20-
echo "##vso[task.setvariable variable=bldenv;]$bldenv"
13+
branch=$(Build.SourceBranchName)
14+
# DIST_MASTER is set in variable.
15+
BRANCH=DIST_${branch^^}
16+
bldenvs=${!BRANCH}
17+
[ "$bldenvs" == "" ] && bldenvs="$(COMMON_LIB_BUILD_ENVS)"
18+
for bldenv in $bldenvs
19+
do
20+
BLDENV=$bldenv make -f Makefile.work configure PLATFORM=vs ENABLE_DOCKER_BASE_PULL=y
21+
done
22+
set +x
23+
echo "##vso[task.setvariable variable=bldenvs;]$bldenvs"
2124
displayName: Make configure
2225
- script: |
2326
set -ex
24-
LIBNL3_VERSION_BASE=$(grep "LIBNL3_VERSION_BASE =" rules/libnl3.mk | awk '{print$3}')
25-
LIBNL3_VERSION=$(grep "LIBNL3_VERSION =" rules/libnl3.mk | awk '{print$3}' | sed -e "s/(//" -e "s/)//" -e "s/\\$//" -e "s/LIBNL3_VERSION_BASE/$LIBNL3_VERSION_BASE/")
26-
BLDENV=$(bldenv) make -f Makefile.work target/debs/$(bldenv)/libnl-3-200_${LIBNL3_VERSION}_amd64.deb ENABLE_DOCKER_BASE_PULL=y
27+
for bldenv in $(bldenvs)
28+
do
29+
LIBNL3_VERSION_BASE=$(grep "LIBNL3_VERSION_BASE =" rules/libnl3.mk | awk '{print$3}')
30+
LIBNL3_VERSION=$(grep "LIBNL3_VERSION =" rules/libnl3.mk | awk '{print$3}' | sed -e "s/(//" -e "s/)//" -e "s/\\$//" -e "s/LIBNL3_VERSION_BASE/$LIBNL3_VERSION_BASE/")
31+
SONIC_BUILD_JOBS=$(nproc) BLDENV=$bldenv make -f Makefile.work target/debs/$bldenv/libnl-3-200_${LIBNL3_VERSION}_amd64.deb ENABLE_DOCKER_BASE_PULL=y
2732
28-
LIBYANG_VERSION_BASE=$(grep "LIBYANG_VERSION_BASE =" rules/libyang.mk | awk '{print$3}')
29-
LIBYANG_VERSION=$(grep "LIBYANG_VERSION =" rules/libyang.mk | awk '{print$3}' | sed -e "s/\\$//" -e "s/(//" -e "s/)//" -e "s/LIBYANG_VERSION_BASE/$LIBYANG_VERSION_BASE/")
30-
BLDENV=$(bldenv) make -f Makefile.work target/debs/$(bldenv)/libyang_${LIBYANG_VERSION}_amd64.deb
31-
find target -name *.deb | xargs -i cp {} $(Build.ArtifactStagingDirectory)
33+
LIBYANG_VERSION_BASE=$(grep "LIBYANG_VERSION_BASE =" rules/libyang.mk | awk '{print$3}')
34+
LIBYANG_VERSION=$(grep "LIBYANG_VERSION =" rules/libyang.mk | awk '{print$3}' | sed -e "s/\\$//" -e "s/(//" -e "s/)//" -e "s/LIBYANG_VERSION_BASE/$LIBYANG_VERSION_BASE/")
35+
SONIC_BUILD_JOBS=$(nproc) BLDENV=$bldenv make -f Makefile.work target/debs/$bldenv/libyang_${LIBYANG_VERSION}_amd64.deb
36+
done
37+
mv target $(Build.ArtifactStagingDirectory)
3238
displayName: Make common lib packages
3339
- publish: $(Build.ArtifactStagingDirectory)
3440
artifact: common-lib
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
variables:
22
DEFAULT_CONTAINER_REGISTRY: 'publicmirror.azurecr.io'
3+
COMMON_LIB_BUILD_ENVS: 'bullseye'

.gitmodules

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@
6262
[submodule "src/redis-dump-load"]
6363
path = src/redis-dump-load
6464
url = https://github.com/p/redis-dump-load.git
65+
[submodule "src/scapy"]
66+
path = src/scapy
67+
url = https://github.com/secdev/scapy.git
6568
[submodule "platform/mellanox/mlnx-sai/SAI-Implementation"]
6669
path = platform/mellanox/mlnx-sai/SAI-Implementation
6770
url = https://github.com/Mellanox/SAI-Implementation
@@ -103,6 +106,6 @@
103106
[submodule "src/sonic-p4rt/sonic-pins"]
104107
path = src/sonic-p4rt/sonic-pins
105108
url = https://github.com/Azure/sonic-pins.git
106-
[submodule "src/thrift_0_14_1/thrift"]
107-
path = src/thrift_0_14_1/thrift
108-
url = https://github.com/apache/thrift.git
109+
[submodule "src/ptf-py3"]
110+
path = src/ptf-py3
111+
url = https://github.com/p4lang/ptf.git

0 commit comments

Comments
 (0)