Skip to content

Commit 39b934c

Browse files
Merge branch 'master' into pensando-mtfuji-v2
2 parents 65ba7f8 + f6a1c2e commit 39b934c

File tree

1,764 files changed

+315785
-70648
lines changed

Some content is hidden

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

1,764 files changed

+315785
-70648
lines changed

.azure-pipelines/azure-pipelines-Official.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ schedules:
1414
- 202012
1515
always: true
1616

17-
pool: sonicbld-1es
17+
pool: sonicso1ES-amd64
1818

1919
stages:
2020
- stage: Build

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ resources:
2626
ref: master
2727
endpoint: sonic-net
2828

29-
pool: sonicbld-1es
29+
pool: sonicso1ES-amd64
3030

3131
parameters:
3232
- name: 'jobFilters'

.azure-pipelines/azure-pipelines-build-vs-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ parameters:
9393

9494
stages:
9595
- stage: BuildVS
96-
pool: sonicbld-1es
96+
pool: sonicso1ES-amd64
9797
jobs:
9898
- template: azure-pipelines-build.yml
9999
parameters:

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ jobs:
7878

7979
- name: marvell-prestera-armhf
8080
${{ if not(parameters.qemuOrCrossBuild) }}:
81-
pool: sonicbld-armhf
81+
pool: sonicso1ES-armhf
8282
variables:
8383
PLATFORM_NAME: marvell-prestera
8484
PLATFORM_ARCH: armhf
8585

8686
- name: marvell-prestera-arm64
8787
${{ if not(parameters.qemuOrCrossBuild) }}:
88-
pool: sonicbld-arm64
88+
pool: sonicso1ES-arm64
8989
variables:
9090
PLATFORM_NAME: marvell-prestera
9191
PLATFORM_ARCH: arm64
@@ -106,12 +106,12 @@ jobs:
106106
platform_rpc: nephos
107107

108108
- name: pensando
109-
pool: sonicbld-arm64
109+
pool: sonicso1ES-arm64
110110
variables:
111111
PLATFORM_ARCH: arm64
112112

113113
- name: nvidia-bluefield
114-
pool: sonicbld-arm64
114+
pool: sonicso1ES-arm64
115115
variables:
116116
PLATFORM_ARCH: arm64
117117

@@ -147,6 +147,7 @@ jobs:
147147
rm target/sonic-vs.img
148148
fi
149149
make $BUILD_OPTIONS target/docker-sonic-vs.gz target/sonic-vs.img.gz
150+
make $BUILD_OPTIONS target/docker-ptf.gz
150151
if [ $(Build.Reason) != 'PullRequest' ];then
151152
gzip -kd target/sonic-vs.img.gz
152153
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

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

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,17 @@ jobs:
6060
fi
6161
displayName: 'Checkout commit'
6262
- script: |
63-
set -x
63+
set -ex
64+
sudo apt-get update
65+
sudo apt-get install -y acl
6466
sudo setfacl -R -b $(Agent.BuildDirectory)
6567
displayName: 'setfacl'
6668
- script: |
69+
set -ex
6770
BRANCH_NAME=$(Build.SourceBranchName)
6871
[ -n "$SYSTEM_PULLREQUEST_PULLREQUESTID" ] && BRANCH_NAME="$SYSTEM_PULLREQUEST_TARGETBRANCH-$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER"
6972
git checkout -b $BRANCH_NAME
7073
sudo modprobe overlay
71-
sudo apt-get install -y acl
7274
sudo bash -c "echo 1 > /proc/sys/vm/compact_memory"
7375
[ -z "$PLATFORM_NAME" ] && PLATFORM_NAME=$(PLATFORM_AZP)
7476
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$PLATFORM_NAME PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure
@@ -78,6 +80,28 @@ jobs:
7880
BUILD_REASON=$(Build.Reason)
7981
echo "Build.Reason = $BUILD_REASON"
8082
echo "Build.DefinitionName = $BUILD_DEFINITIONNAME"
83+
if [[ "$BUILD_REASON" == "PullRequest" ]]; then
84+
echo "Checking for changes to dockers/docker-ptf/Dockerfile.j2 in PR..."
85+
# Get the target branch and check for changes
86+
TARGET_BRANCH="origin/$(System.PullRequest.TargetBranch)"
87+
echo "Comparing against target branch: $TARGET_BRANCH"
88+
# Fetch target branch to ensure we have the latest
89+
git fetch origin $(System.PullRequest.TargetBranch)
90+
# Check if docker-ptf Dockerfile.j2 has changes
91+
# NOTE: The PTF_MODIFIED template parameter is of type string
92+
# Ensure to set it to "True" or "False" (not boolean true/false)
93+
if git diff --name-only $TARGET_BRANCH...HEAD | grep -q "dockers/docker-ptf/Dockerfile.j2"; then
94+
echo "docker-ptf/Dockerfile.j2 has been modified in this PR"
95+
echo "##vso[task.setvariable variable=PTF_MODIFIED;isOutput=true]True"
96+
else
97+
echo "docker-ptf/Dockerfile.j2 has not been modified in this PR"
98+
echo "##vso[task.setvariable variable=PTF_MODIFIED;isOutput=true]False"
99+
fi
100+
else
101+
echo "Not a PR build, setting PTF_MODIFIED to false"
102+
echo "##vso[task.setvariable variable=PTF_MODIFIED;isOutput=true]False"
103+
fi
104+
81105
if [[ "$BUILD_REASON" != "PullRequest" && "$BUILD_DEFINITIONNAME" == "Azure.sonic-buildimage.official.vs" ]]
82106
then
83107
PORT=443
@@ -96,6 +120,7 @@ jobs:
96120
mv target/* $(Build.ArtifactStagingDirectory)/target/
97121
env:
98122
REGISTRY_PASSWD: $(REGISTRY_PASSWD)
123+
name: PublishAndSetPtfTag
99124
displayName: Publish to Docker Registry and Copy Artifacts
100125
condition: always()
101126
- publish: $(Build.ArtifactStagingDirectory)

.azure-pipelines/baseline_test/baseline.test.buildimage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ variables:
5959

6060
stages:
6161
- stage: BuildVS
62-
pool: sonicbld-1es
62+
pool: sonicso1ES-amd64
6363
jobs:
6464
- template: ../azure-pipelines-build.yml
6565
parameters:

.azure-pipelines/build-template.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ parameters:
3535
- name: pool
3636
type: string
3737
values:
38-
- sonicbld-1es
39-
- sonicbld_8c
40-
default: sonicbld-1es
38+
- sonicso1ES-amd64
39+
- sonicso1ES-arm64
40+
- sonicso1ES-armhf
41+
default: sonicso1ES-amd64
4142

4243
- name: dbg_image
4344
type: boolean

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

Lines changed: 0 additions & 115 deletions
This file was deleted.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ stages:
4040
- stage: Build
4141
jobs:
4242
- job: Build
43-
pool: sonicbld-1es
43+
pool: sonicso1ES-amd64
4444
timeoutInMinutes: 360
4545
steps:
4646
- template: cleanup.yml
@@ -55,8 +55,8 @@ stages:
5555
set -xe
5656
git submodule update --init --recursive -- src/sonic-platform-daemons src/sonic-genl-packet src/sonic-sairedis src/ptf src/sonic-device-data src/sonic-dash-api
5757
58-
make SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic DOCKER_BUILDKIT=0
59-
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
58+
make NOBUSTER=1 NOBULLSEYE=1 SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic DOCKER_BUILDKIT=0
59+
make -f Makefile.work BLDENV=bookworm SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y target/docker-sonic-mgmt.gz
6060
cp target -r $(Build.ArtifactStagingDirectory)/target
6161
docker load -i target/docker-sonic-mgmt.gz
6262
docker tag docker-sonic-mgmt $REGISTRY_SERVER/docker-sonic-mgmt:latest
@@ -69,7 +69,7 @@ stages:
6969
displayName: "Archive docker image sonic-mgmt"
7070

7171
- job: validate_docker_image_and_upload
72-
pool: sonicbld-1es
72+
pool: sonicso1ES-amd64
7373
timeoutInMinutes: 360
7474
dependsOn: Build
7575
steps:

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

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ parameters:
1010
- amd64
1111
- armhf
1212
- arm64
13-
- name: march
14-
type: string
15-
default: ''
1613
- name: dist
1714
type: string
1815
values:
@@ -30,22 +27,22 @@ parameters:
3027
default: sonicdev
3128
- name: pool
3229
type: string
33-
default: sonicbld-1es
30+
default: sonicso1ES-amd64
3431
values:
35-
- sonicbld-1es
36-
- sonicbld-arm64
37-
- sonicbld-armhf
32+
- sonicso1ES-amd64
33+
- sonicso1ES-arm64
34+
- sonicso1ES-armhf
3835

3936
jobs:
40-
- job: sonic_slave_${{ parameters.dist }}${{ parameters.march }}
37+
- job: sonic_slave_${{ parameters.dist }}_${{ parameters.arch }}
4138
timeoutInMinutes: 360
4239
variables:
43-
- template: /.azure-pipelines/template-variables.yml@buildimage
44-
- template: /.azure-pipelines/azure-pipelines-repd-build-variables.yml@buildimage
40+
- template: template-variables.yml
41+
- template: azure-pipelines-repd-build-variables.yml
4542
pool: ${{ parameters.pool }}
4643
steps:
4744
- template: cleanup.yml
48-
- template: /.azure-pipelines/template-clean-sonic-slave.yml@buildimage
45+
- template: template-clean-sonic-slave.yml
4946
- checkout: self
5047
clean: true
5148
- task: Docker@2
@@ -68,7 +65,7 @@ jobs:
6865
exit 0
6966
fi
7067
71-
DOCKER_DATA_ROOT_FOR_MULTIARCH=/data/march/docker BLDENV=${{ parameters.dist }} make -f Makefile.work configure $build_options PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} $args || docker image ls $image_tag
68+
BLDENV=${{ parameters.dist }} make -f Makefile.work configure $build_options PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} || docker image ls $image_tag
7269
if [[ "$(Build.Reason)" == "PullRequest" ]];then
7370
exit 0
7471
fi

0 commit comments

Comments
 (0)