Commit Graph

170 Commits

Author SHA1 Message Date
Ze Gan
1c901b8f12
[docker-database]: Install sonic-dash-api CLI in database container (#17479)
Add sonic-dash-api CLI in database container for decoding the dash objects from protobuf to readable json.

Signed-off-by: Ze Gan <ganze718@gmail.com>
2024-02-01 11:13:51 -08:00
Liu Shilong
2d96186091
[ci] Update reproducible build pipeline, disable barefoot build. (#17857)
Fix reproducible build Upgrade version pipeline.

Remove barefoot build. Because it failed on sai package.
add marvell-arm64/pensando build.

Microsoft ADO (number only): 26515265
2024-01-23 09:01:14 -08:00
Liu Shilong
e30782b0fe
[ci] Enable cache for marvell-arm64 build in PR checks. (#15449)
Why I did it
Enable build cache for marvell-arm64 build to decrease PR check duration.

Work item tracking
Microsoft ADO (number only): 26340500
How I did it
How to verify it
2024-01-09 20:28:31 +08:00
Liu Shilong
979516633d
[ci] Support pensando platform build in pipeline. (#17512)
Why I did it
Update pipeline file to support pensando's build.

Work item tracking
Microsoft ADO (number only): 26087700
How I did it
How to verify it
2023-12-15 16:52:51 +08:00
Ze Gan
dac2ba6e1b
[Azp]: Add dash-api dependencies on building Azp ubuntu20.04 (#17507)
Signed-off-by: Ze Gan <ganze718@gmail.com>
2023-12-14 08:59:16 -08:00
Ze Gan
b21f33b8b1
[Azp]: Fix azp on building ubuntu20.04 and sonic-mgmt (#17439)
The Azp failed on ubuntu20.04 and sonic-mgmt building due to sonic-dash-api updating.

Signed-off-by: Ze Gan <ganze718@gmail.com>
2023-12-13 22:49:04 -08:00
Saikrishna Arcot
7c5f616469
Fix sonic-mgmt docker build due to Bookworm changes (#17309)
* Fix sonic-mgmt docker build due to Bookworm changes

Because of the Bookworm upgrade, when some build target is specified on
the command line, the build system will try to build everything for
buster and bullseye distros, even if it's not needed by the target.

As a workaround, call the underlying Makefile.work script with
`BLDENV=bullseye` to have it only build packages related to sonic-mgmt.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

* Mark docker-sonic-mgmt as a Bullseye container

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

---------

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2023-11-28 16:41:13 -08:00
Saikrishna Arcot
b46f967474 Add Bookworm slave container
Changes from Bullseye slave container:
* Python 2 is no longer available at all
* Python 3.11 (instead of Python 3.9)
* GCC 12 (instead of GCC 10)
* Python ipaddr package is no longer available
* OpenJDK 17 (instead of OpenJDK 11)
* Remove doxygen armhf manual compilation (no longer needed)
* Disable FIPS, as the FIPS binaries are currently not yet available
* Install Python setuptools through Debian instead of pip
* Install Python wheel through Debian instead of pip
* Install Python nose through Debian instead of pip
* Install Python j2cli through Debian instead of pip
* Install Python pexpect through Debian instead of pip
* Install Python parameterized through Debian instead of pip
* Install Python pyyaml through Debian instead of pip
* Install Python pyfakefs through Debian instead of pip
* Install Python m2crypto through Debian instead of pip
* Python pympler 1.0 (instead of 0.8)
* Install Python build (as a replacement to setup.py)

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2023-11-21 18:53:15 -08:00
ShiyanWangMS
63b2d68d70
First commit (#17199)
Why I did it
Work item tracking
Microsoft ADO (number only): 25858445
How I did it
sonic-mgmt-docker with both Python2 and Python3 tag is latest
sonic-mgmt-docker with Python3 only tag is py3only

How to verify it
2023-11-17 10:05:26 +08:00
ShiyanWangMS
a7695e0221
Add Python3-only sonic-mgmt-docker build pipeline file (#17187)
Why I did it
Work item tracking
Microsoft ADO (number only): 25858445
How I did it
docker-sonic-mgmt.yml will build docker with Python2 and Python3 both.
docker-sonic-mgmt-py3-only.yml will build docker with Python3 only.
2023-11-16 15:32:48 +08:00
ShiyanWangMS
c75a662ac8
Add Azure pipeline to build legacy sonic-mgmt-docker (#17073)
Why I did it
This is part of Python3 migration project.
This pipeline will build sonic-mgmt-docker with both Python2 and Python3.

The main difference between legacy sonic-mgmt-docker and now is:
make LEGACY_SONIC_MGMT_DOCKER=y target/docker-sonic-mgmt.gz
docker tag docker-sonic-mgmt $REGISTRY_SERVER/docker-sonic-mgmt:legacy

Work item tracking
Microsoft ADO (number only): 25254349

How I did it
Add pipeline file.
2023-11-07 13:27:41 +08:00
lixiaoyuner
b2c8ad8b10
Fix K8S_OPTIONS maybe empty issue (#16891)
Why I did it
K8S_OPTIONS maybe empty, so there will be syntax error. Need to fix this issue.

Work item tracking
Microsoft ADO (number only): 25495020
How I did it
Add "" for K8S_OPTIONS to avoid exception.

How to verify it
No more exception is throwed in PR build validation pipeline.
2023-10-23 14:02:07 +08:00
xumia
fe24c26996
[Ci] Change the package upgrade PR title (#16674)
* [Ci] Change the package upgrade PR title

* Change the branchname variable, and change the body
2023-09-27 20:50:21 +08:00
Liu Shilong
78415800a5
[ci] Disable building broadcom raw image because of S6100 device disk space limit. (#16516)
* [ci] Disable building broadcom raw image because of S6100 device disk space limit.
2023-09-11 15:10:03 -07:00
Liu Shilong
459ba257a4
[ci] Add job to cleanup nfs in armhf and arm64 agents. (#16270)
Why I did it
Clean old cached file in nfs disk for armhf/arm64

Work item tracking
Microsoft ADO (number only): 24930879
2023-08-29 19:14:45 +08:00
Liu Shilong
104ae5d185
[ci] Fix pipeline 'Check if vstest is needed.' issue. (#15958)
Why I did it
Line:7 will exit when k8s file didn't change.
Use 'System.PullRequest.TargetBranchName' instead of 'System.PullRequest.TargetBranch'. Because git server in AzDevOps don't support 'System.PullRequest.TargetBranch'.
Work item tracking
Microsoft ADO (number only): 24636791
How I did it
How to verify it
2023-07-25 18:24:57 +08:00
lixiaoyuner
10b65d9826
Add k8s master code new (#15716)
Why I did it
Currently, k8s master image is generated from a separate branch which we created by ourselves, not release ones. We need to commit these k8s master related code to master branch for a better way to do k8s master image build out.

Work item tracking
Microsoft ADO (number only):
19998138
How I did it
Install k8s dashboard docker images
Install geneva mds and mdsd and fluentd docker images and tag them as latest, tagging latest will help create container always with the latest version
Install azure-storage-blob and azure-identity, this will help do etcd backup and restore.
Install kubernetes python client packages, this will help read worker and container state, we can send these metric to Geneva.
Remove mdm debian package, will replace it with the mdm docker image
Add k8s master entrance script, this script will be called by rc-local service when system startup. we have some master systemd services in compute-move repo, when VMM service create master VM, VMM will copy all master service files inside VM, the entrance script will setup all services according to the service files.
When the entrance script content changed, the PR build will set include_kubernetes_master=y to help do validation for k8s master related code change. The default value of include_kubernetes_master should be always n for public master branch. We will generate master image from internal master branch
How to verify it
Build with INCLUDE_KUBERNETES_MASTER = y
2023-07-25 07:44:59 +08:00
Chun'ang Li
c07447ae61
Refine PR test template format (#15636)
Why I did it
Refine PR test template format.

How I did it
Refine PR test template format.

How to verify it
PR test executed normally.

Signed-off-by: Chun'ang Li <chunangli@microsoft.com>
2023-07-10 10:47:40 +08:00
Ze Gan
2f8994999b
[dash-api]: Add dash-api and related protobuf library (#14515)
Why I did it
For the DASH scenario, the APP_DB will be optimized by protobuf message for less memory consumption.

How I did it
Download the Debian package of protobuf 3.21.12 and create a corresponding rule for building it.
Add a submodule of sonic-dash-api and generated its Debian package which includes C++ library and Python library

How to verify it
Check artifacts of Azp that the protobuf-related and dash-api deb packages should be generated.

Signed-off-by: Ze Gan <ganze718@gmail.com>
2023-07-05 09:59:35 -07:00
Ye Jianquan
4449d473ae
[CI/CD] Refine t0 sonic and remove SPECIFIED_PARAMS (#15625)
Why I did it
t0-sonic's specific params has been set on sonic-mgmt repo, remove useless SPECIFIED_PARAMS usage
2023-06-27 11:01:41 +08:00
Liu Shilong
d2915969d4
[ci] Add OVERRIDE_BUILD_OPTIONS in image build template. (#15309)
Why I did it
Set build options in pipeline UI.
Support setting reproducible build options to py2,py3 in release branch and none in master branch.

Work item tracking
Microsoft ADO (number only): 22335854
How I did it
How to verify it
2023-06-05 18:42:06 +08:00
Ye Jianquan
d86aa20ef5
[CI/CD] Refine pr test definition, remove old test jobs and testbedv2 flags (#15302) 2023-06-02 16:33:30 +08:00
Ye Jianquan
f4ef94c38b
[CI/CD] Refine PR test templates and test_plan.py to be ready to migrate to Elastictest (#15256) 2023-05-31 09:37:51 +08:00
Liu Shilong
3b10334e10
[ci] Remove saiserverv2 build in official build. (#15191)
Why I did it
libsaithriftv2 build fails and nobody is maintaining saiserverv2's build.
Remove them from official build.

Work item tracking
Microsoft ADO (number only): 23764652
How I did it
How to verify it
2023-05-23 10:22:31 +00:00
Liu Shilong
2505dac8fb
[ci] Enable kvm test when upgrading package versions. (#15111)
Why I did it
Run kvmtest when update package versions to avoid test break.

Work item tracking
Microsoft ADO (number only): 22335854
How I did it
How to verify it
2023-05-18 16:02:22 +08:00
Liu Shilong
b9c25ec006
Add OVERRIDE_BUILD_OPTIONS options in UpgrateVersion pipeline. (#15088)
Why I did it
Provide a method to override build options in webUI.
We can stop python dependency upgrade version.

Work item tracking
Microsoft ADO (number only): 22335854
How I did it
Add a variable at the tail of make command.
2023-05-17 11:07:35 +08:00
xumia
50fb266c16
[Ci] Support marvell/marvell-arm64 build (#14875)
Why I did it
Support marvell/marvell-arm64 build

Work item tracking
Microsoft ADO (number only): 19995559
How I did it
2023-05-05 12:40:35 +08:00
xumia
09bd333b63
[Build] Fix the reproducible build variable display error in the slave container (#14543)
Why I did it
Enable the reproducible build for PR build for master branch

Fix the reproducible build variable display error in the slave container.
The below config is none, although the config is set and takes effect.

"SONIC_VERSION_CONTROL_COMPONENTS": "none"
How I did it
Passing the variable through the slave container command line.
The variable has been passed to the slave container and the other docker container by a config file, it is only used to display the value during the build.

How to verify it
See https://dev.azure.com/mssonic/build/_build/results?buildId=247960&view=logs&j=88ce9a53-729c-5fa9-7b6e-3d98f2488e3f&t=88f376cf-c35d-5783-0a48-9ad83a873284

"SONIC_VERSION_CONTROL_COMPONENTS": "deb,py2,py3,web,git,docker"
2023-04-10 14:56:30 +08:00
xumia
46cb2ad03d
[Ci] Fix the wrong SONIC_BUILD_JOBS build variable used issue in Azp (#14071)
Why I did it
[Ci] Fix the no parallel jobs in some of the platforms issue
We observed some of the pipelines running more time than expected. The issue is the SONIC_BUILD_JOBS using the wrong value 1. It is caused by the runtime variable issue, there is additional single quota mark character added in the make command line.

make 'SONIC_BUILD_JOBS=$(nproc)' targe/xxxx
Need to change to

make SONIC_BUILD_JOBS=$(nproc) targe/xxxx
It is to improve the build performance for some of the platforms using the variable SONIC_BUILD_JOBS=1.
Good one vs: https://dev.azure.com/mssonic/build/_build/results?buildId=227986&view=logs&j=cef3d8a9-152e-5193-620b-567dc18af272&t=cf595088-5c84-5cf1-9d7e-03331f31d795

"SONIC_BUILD_JOBS"                : "8"
Bad one barefoot: https://dev.azure.com/mssonic/build/_build/results?buildId=227379&view=logs&j=993d6e22-aeec-5c03-fa19-35ecba587dd9&t=7be0d2ec-661f-5569-462c-2d9b7ca4ca5d

"SONIC_BUILD_JOBS"                : "1"
How I did it
Expand the BUILD_OPTIONS variable for all platforms.
2023-04-07 09:35:02 +08:00
Ye Jianquan
7509eb3bcd
Refine testbedv2 pr template (#14371)
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
2023-03-29 18:35:08 +08:00
Liu Shilong
f19c8a7be5
[ci] Fix build issue for vs vhdx image. #14427
Why I did it
sonic-slave-stretch build failed for mmh3 version update to 3.10 on Mar 24.

How I did it
Enable reproducible build for vhdx image.

How to verify it
2023-03-27 16:58:37 +00:00
Liu Shilong
36f3745988
[ci] Fix SONiC cache build pipeline, which breaks for template change. (#13945)
Why I did it
It is affected by recent PR which changed pipeline template reference.
pipeline failed.

How I did it
2023-02-27 14:34:23 +08:00
xumia
39c3f650a7
[Ci] Support the SONiC reproducible build in Azure Pipelines (#13986)
Why I did it
[Ci] Support the SONiC reproducible build in Azure Pipelines
Enable the reproducible build on master branch
Enable the mirror snapshot based build on 202205+ which support snapshot build.

How I did it
Enable the build flag on Azure Pipelines.

How to verify it
2023-02-27 12:26:14 +08:00
Liu Shilong
5a2a95998c
[ci] Fix docker hang issue and change template reference branch (#13894)
Why I did it
Azure pipeline change.
Use common template to make it easy to change common steps.
Fix docker hang issue.

How I did it
2023-02-22 13:00:06 +08:00
xumia
5e4826ebf7
[Ci] Support to use the same snapshot for all platform builds (#13913)
IBGP
2023-02-22 11:18:09 +08:00
Liu Shilong
22e46207c8
[ci] Kill hanged docker build process to avoid build timeout issue. (#13726)
Why I did it
Docker build has a low rate of hanging up.
It hangs on different steps. So, it looks like a bug in docker daemon.

How I did it
Start a daemon process to scan running time more than 1 hours, and kill the process.

How to verify it
2023-02-16 21:58:14 +08:00
Liu Shilong
8867deee13
[ci] Disable DOCKER_BUILDKIT in pipeline build for OOM issue. (#13702)
Why I did it
New docker release v23.0 uses BUILDKIT by default.
It leads to OOM issue in pipeline build.

##[error]Exit code 137 returned from process: file name '/agent/externals/node16/bin/node',
How I did it
Disable BUILDKIT when building sonic-slave-* image.
Keep checking if there are issues when building docker image inside sonic-slave-*.

How to verify it
Check docker build logs.
Disable BUILDKIT log:

Step 1/80 : FROM publicmirror.azurecr.io/debian:buster
 ---> ff5db168d4c5
2023-02-08 15:31:22 +08:00
Liu Shilong
20f47bb5ac
Update docker-sonic-mgmt to buster (#13287)
Why I did it
docker-sonic-mgmt build is failing.

How I did it
stretch docker is disabled recently. Update docker-sonic-mgmt to buster.
Migrate from sonictest to sonicbld. Because Azure requires migrate vm from uswest2 to uswest3.
Fix a build issue when build image.
How to verify it
2023-01-11 16:00:47 +08:00
Liu Shilong
a5d71576db
[ci] Fix docker-sonic-slave pipeline template build options. (#13290)
Why I did it
docker-sonic-slave pipeline has a different tag with PR build.
It leads to ENABLE_DOCKER_BASE_PUll=y not work.

How I did it
set reproducible build option in bash.

How to verify it
2023-01-09 13:27:15 +08:00
Yutong Zhang
24758dfe0a
Improve the display of pipeline. (#13123)
The display of azure pipeline is not specific now, such as when the step Run test fails, the display of itself shows successful, but the display of step Kvmdump shows fails, but actually, the step Kvmdump doesn't fail. I improve the display of azure pipeline in this pr, each step has its own success or failure, and is shown in azure pipeline.

Why I did it
The display of azure pipeline is not specific now, such as when the step Run test fails, the display of itself shows successful, but the display of step Kvmdump shows fails, but actually, the step Kvmdump doesn't fail. I improve the display of azure pipeline in this pr, each step has its own success or failure, and is shown in azure pipeline.

How I did it
1. Each step has its own signature of success or failure.
2. Using the chain of responsibility pattern to manage all status.
3. Modify the expected-state in each step.
2023-01-09 10:10:17 +08:00
Richard.Yu
689f7d2c43
[SAI-PTF][BFN]Enable saiserver test container on bfn container (#13166)
Why I did it
Enable Test sai api on bfn container with a lightweight container(saiserver).

How I did it
enable saiserver container on barefoot platform.

add docker-saiserver-bfn.mk for building saiserver container
in platform/barefoot/docker-saiserver-bfn, add necessary files that needs in saiserver container
How to verify it
Tested on Intel platform ec9516

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
2023-01-06 11:45:03 +08:00
Liu Shilong
e0c29aabe0
[ci] Fix docker sonic slave tag issue. (#13179) 2022-12-28 10:56:50 +08:00
Liu Shilong
550cd6649f
Fix sonic slave pipeline to set correct tag on sonic slave image. (#13177)
Why I did it
Currently sonic-slave-* tag is confusing. Set correct tag on sonic-slave-* image.
Fix job name to fit the build.

How I did it
build amd image in amd64:
sonic-slave-bullseye:cfe29bff67c
sonic-slave-bullseye:latest
sonic-slave-bullseye:master

build armhf image in amd64:
sonic-slave-bullseye-march-armhf:33614806dc3
sonic-slave-bullseye-march-armhf:latest
sonic-slave-bullseye-march-armhf:master

build arm64 image in amd64:
sonic-slave-bullseye-march-arm64:f3b1b16c801
sonic-slave-bullseye-march-arm64:latest
sonic-slave-bullseye-march-arm64:master

build arm64 image in arm64:
sonic-slave-bullseye:75cb326c9a7
sonic-slave-bullseye-arm64:latest
sonic-slave-bullseye:master

build armhf image in armhf:
sonic-slave-bullseye:64d178951fc
sonic-slave-bullseye-armhf:latest
sonic-slave-bullseye:master

How to verify it
2022-12-27 15:40:15 +08:00
Liu Shilong
449ae1332f
[ci] Add branch tag on sonic-slave-bullseye image. (#13151)
Why I did it
tag sonic-slave-* image with branch.
Only keep sonic-slave-* latest tag when it is master branch and amd64 arch.

How I did it
How to verify it
2022-12-26 10:35:15 +08:00
Liu Shilong
364045cfe5
[build] Add retry when make SONiC image to improve success rate. (#12325)
Why I did it
Makefile needs some dependencies from the Internet. It will fail for network related issue.
Retries will fix most of these issues.

How I did it
Add retries when running commands which maybe related with networking.

How to verify it
2022-12-19 12:18:36 +08:00
Liu Shilong
d9eec94c18
[build] Remove sonic-build-hooks in slave base tag. (#12966) 2022-12-09 16:12:59 +08:00
Liu Shilong
82cbe6b029
[ci] Disable Shallow fetch in pipeline build. (#12964) 2022-12-09 16:12:43 +08:00
wenyiz2021
5073dc0f8b
[MASIC] [azp] remove official-build-multi-asic.yml (#12973)
remove ..multi-asic.yml file as original purpose was to test stability before multi_asic PR check were brought up
2022-12-07 15:12:12 -08:00
Yutong Zhang
cb354a5af2
[TestbedV2][master] Remove timeout in each step. (#12915)
Previously, we set timeout in each step such as Lock testbed, Prepare testbed, Run test and KVM dump. When some issue suck like retry happens in one step, it will cause timeout error, but actually, it only needs more time to success. In this pr, we remove the timeout limit in each step and control the timeout outside in each job. When the job runs more than four hours, it will be cancelled.

Why I did it
Previously, we set timeout in each step such as Lock testbed, Prepare testbed, Run test and KVM dump. When some issue suck like retry happens in one step, it will cause timeout error, but actually, it only needs more time to success. In this pr, we remove the timeout limit in each step and control the timeout outside in each job. When the job runs more than four hours, it will be cancelled.

How I did it
Remove the timeout parameter in each step, and control the timeout outside in each job.

How to verify it
Set the timeout of one job to 4 hours, and when timeout happens, azure pipeline will cancel this job.
2022-12-03 22:30:03 -08:00
zitingguo-ms
b774ebfdc2
[SAI-PTF] Publish docker saiserverv2 in master branch (#12842)
Why I did it
Publish docker saiserverv2 in the build pipeline.

How I did it
Add docker saiserverv2 target in the build template.

How to verify it
Test this by running this pipeline: https://dev.azure.com/mssonic/build/_build/results?buildId=182134&view=results
2022-11-30 22:26:54 -08:00