Commit Graph

73 Commits

Author SHA1 Message Date
Liu Shilong
d360ec030d
[ci] Add OVERRIDE_BUILD_OPTIONS in image build template. (#15309) (#15341)
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-08 09:42:31 +08:00
xumia
2001bbd07b
[Build][202106] Support Debian snapshot mirror to improve build stability (#14663)
Why I did it
Cherry-pick commits from master to support the snapshot based mirror, and fix the code conflicts.

ad162ae [Build] Optimize the version control for Debian packages (#14557)
38c5d7f [Build] Support j2 template for debian sources for docker ptf (#13198)
5e4826e [Ci] Support to use the same snapshot for all platform builds (#13913)
8206925 [Build] Change the default mirror version config file (#13786)
5e4a866 [Build] Support Debian snapshot mirror to improve build stability (#13097)
ac5d89c [Build] Support j2 template for debian sources (#12557)

Work item tracking
Microsoft ADO (number only): 18018114
How I did it
How to verify it
2023-04-18 10:24:53 +08:00
Liu Shilong
3ad9fcaa17
[ci] Fix docker hang issue and change template reference branch (#13894) (#13920)
Why I did it
Cherry pick PR(#13894)
Azure pipeline change.
Use common template to make it easy to change common steps. Fix docker hang issue.

How I did it
How to verify it
2023-02-23 14:04:26 +08:00
Liu Shilong
b18751f721
[ci] Kill hanged docker build process to avoid build timeout issue. (#13726) (#13730)
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-20 18:16:05 +08:00
Liu Shilong
5db68009ad
Fix sonic slave pipeline to set correct tag on sonic slave image. (#13177) (#13385) 2023-01-18 11:33:11 +08:00
xumia
fc0a64092a
[Ci] Remove the platform innovium from version auto upgrade pipeline (#13208)
Why I did it
[Ci] Remove the platform innovium from version auto upgrade pipeline

There is a build issue in the specific platform innovium, it blocks the upgrade job to run successfully, disable the version upgrade temporarily.

How I did it
Remove the upgrade job for innovium
2023-01-06 16:10:48 +08:00
Liu Shilong
a3a704cf19
[build] Add retry when make SONiC image to improve success rate. (#12325) (#13131)
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-23 18:51:43 +08:00
Liu Shilong
5417aab4ec
[202106][ci] Cherry-pick PRs relative to reproducible build option from master branch. (#12350)
* [ci] Update azp template variable for reproducible build. (#11419)

* [ci] Disable reproducible build in master branch official build (#11452)

* [ci] Update reproducible build related pipeline. (#11810)

* [ci] Fix bug involved by PR 11810 which affect official build pipeline (#11891)

Why I did it
Fix the official build not triggered correctly issue, caused by the azp template path not existing.

How I did it
Change the azp template path.
2022-10-25 16:33:25 +08:00
Liu Shilong
95df56b4ed
[ci] Update azp reference to support transfering organization from Azure to sonic-net (#11604) 2022-08-02 16:16:32 +08:00
Liu Shilong
9fd9409590
[build] Add version files to docker image dependencies (#11193)
* [build] Add version files to docker image dependencies

* [ci] Support to skip vstest using include/exclude config file. (#11086)

example:
├── folderA
│  ├──  fileA (skip vstest)
│  ├──  fileB
│  └──  fileC
If we want to skip vstest when changing /folderA/fileA, and not skip vstest when changing fileB or fileC.

vstest-include:
^folderA/fileA

vstest-exclude:
^folderA
2022-06-22 14:13:08 +08:00
Shilong Liu
a0ef7459f2
[ci] Add arm artifacts in common lib azure pipeline (#10891)
cherry-pick PR from master:
https://github.com/Azure/sonic-buildimage/pull/10817
2022-05-24 14:58:19 +08:00
Shilong Liu
56bccb6478
[ci] Add azure pipeline to build common libs. (#10367) (#10688)
Why I did it
To remove reference on Azure.sonic-buildimage artifacts.
Azure.sonic-buildimage has a higher failure rate.
2022-04-27 00:13:16 +08:00
Shilong Liu
c929c08672
[ci] Fix PR checker archieve artifacts step (#9357) (#10651)
Why I did it
When a failed job retry. Publish artifact will fail for duplicated name
2022-04-23 13:57:35 +08:00
xumia
331bc53c6f [Build]: Support reproducible build for release branches (#9426)
[Build]: Support reproducible build for release branches #9426
2022-04-18 08:19:29 +08:00
xumia
6b88f4b33d [Bug][Build]: fix the file not found issue caused by the relative pat… (#9443)
Fix the nodesource.list cannot read issue, it is cased by the full path not used.

```
2021-12-03T06:59:26.0019306Z Removing intermediate container 77cfe980cd36
2021-12-03T06:59:26.0020872Z  ---> 528fd40e60f6
2021-12-03T06:59:26.0021457Z Step 81/81 : RUN post_run_buildinfo
2021-12-03T06:59:26.0841136Z  ---> Running in d804bd7e1b06
2021-12-03T06:59:29.1626594Z DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
2021-12-03T06:59:34.2960105Z /usr/bin/sed: can't read nodesource.list: No such file or directory
2021-12-03T06:59:34.5094880Z The command '/bin/sh -c post_run_buildinfo' returned a non-zero code: 2
```

Co-authored-by: Ubuntu <xumia@xumia-vm1.jqzc3g5pdlluxln0vevsg3s20h.xx.internal.cloudapp.net>
2022-04-18 08:19:29 +08:00
Shilong Liu
ac9c0b5269 [ci] Set default ACR in UpgrateVersion/PR/official pipeline. (#10341)
Why I did it
docker hub will limit the pull rate.
Use ACR instead to pull debian related docker image.

How I did it
Set DEFAULT_CONTAINER_REGISTRY in pipeline.
2022-04-08 13:09:58 +08:00
xumia
d354cd84d6 [ci] Fix the generating version file failure issue caused by artifacts folder change (#7464) (#10451)
Fix the generating version file failure issue caused by artifacts folder change.
When changing to use the same template for PR build, official build and packages version upgrade, the artifacts folder adding a "target" folder, the version upgrade task should be changed accordingly.
2022-04-02 14:41:13 +00:00
xumia
a4b26ce298 Update azure-pipelines-UpgrateVersion.yml for Azure Pipelines
Remove duplicate resources define in template
2022-04-02 08:29:02 +08:00
Shilong Liu
e28c30d4e4 [build] Fix issues found in reproducible build. (#10407) 2022-04-01 23:58:48 +00:00
Shilong Liu
1366e0bb63 [ci] Use template from master branch in UpgrateVersion/sonic-slave pipeline (#10380) 2022-04-01 23:58:29 +00:00
Shilong Liu
ab91b607f2
[ci] Fix remove sonic-slave-* docker image issue when building sonic-slave* (#10296) (#10381) 2022-03-30 16:08:52 +08:00
xumia
37aaed44bd [Build]: Support to set jobFilters (#10280)
[Build]: Support to set jobFilters
2022-03-21 02:28:54 +00:00
Guohan Lu
fd8d80486d [ci]: build marvel armhf on sonicbld-armhf pool [Guohan Lu]
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2022-03-18 14:55:15 +00:00
Guohan Lu
2340071d4a [ci]: build centec arm64 to sonicbld-arm64 pool
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2022-03-15 12:35:50 +00:00
xumia
d75c569ef0 [Build][Ci]: Support to use the cisco sai packages built by azp (#10102)
Why I did it
Support to use the cisco sai packages built by azp
2022-03-08 02:18:58 +00:00
Shilong Liu
f5bef56d5e [CI] Fix Azure pipeline set -e not work. (#9282)
In azure pipeline template 'set -e' not works as expected.
2022-01-24 15:26:06 +08:00
Shilong Liu
606d64378f Add artifacts for failure build to debug. (#9213) 2021-11-14 15:25:03 -08:00
Shilong Liu
206f7b66b5 Fix azp pipeline file which is involved by former PR (#8616) 2021-11-01 10:31:23 -07:00
xumia
2436f96c0a Fix failed to download cisco artifacts issue (#8942)
Why I did it
Fix the failure to download cisco artifacts issue
2021-10-14 15:28:44 -07:00
xumia
6e08bf2584 [ci]: Support azp for cisco 8000 (#8654)
Why I did it
Setup Azure pipeline for cisco 8000.
2021-10-14 15:28:40 -07:00
Shilong Liu
90e7f6b201 [build] Fix reproducible build issues (#8548)
* [build] Fix reproducible build issues
2021-09-02 15:37:42 -07:00
Shilong Liu
7916276330 Enable reproducible build in base docker image sonic-slave-* (#8116) 2021-07-13 13:16:01 -07:00
xumia
543c0b24f8
Support azure pipelines for 202106 branch (#8118)
Support azure pipelines for 202106 branch
2021-07-09 15:40:40 +08:00
Shilong Liu
a3894b723e
[CI] Azp add cache-building job (#7871)
This job will make cache file more quickly than official build.
2021-06-23 18:44:40 -07:00
xumia
0b53a60412
[ci]: build rpc image for mellanox (#7905) 2021-06-20 23:12:25 -07:00
Shilong Liu
52c721887e
[CI] Add publish step in docker-sonic-mgmt azure pipeline (#7902) 2021-06-17 10:26:21 -07:00
Shilong Liu
df62e9cb22
[CI] Fix azp built docker-sonic-mgmt image (#7890)
UserID is different with the image built by Jenkins if we build docker-sonic-mgmt in sonicbld pool.
So we build this image in sonictest pool. There is a sonictmp user with UserID 1001.
This will make docker image same as the image built in Jenkins
2021-06-16 09:41:42 -07:00
Shilong Liu
aeeef2d382
[CI] Fix azp targets for innovium platform (#7870)
There is no rule to build swi target. The correct target is *.bin.
2021-06-15 16:38:02 -07:00
Myron Sosyak
9a7b83c693
[BFN] Add missed param for syncd-rpc build (#7792)
To fix syncd-rpc build for BFN paltform
2021-06-08 09:43:00 -07:00
Myron Sosyak
05dddea9da
[BFN] Enable syncd-rpc build (#7646)
Why I did it
To enable syncd-rpc for Barefoot build

How I did it
Set the flag

How to verify it
ENABLE_SYNCD_RPC=y make configure PLATFORM=barefoot
ENABLE_SYNCD_RPC=y make all
2021-06-02 20:01:35 +08:00
Shilong Liu
80fe4ed860
[ci]: enable official build in release branch (#7603)
Signed-off-by: Shilong Liu <shilongliu@microsoft.com>
2021-05-13 07:54:11 -07:00
Guohan Lu
a2d33a2a37 [ci]: enable sonic-slave scheduled build on 202012
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-05-05 07:33:31 -07:00
Guohan Lu
853c214951 [ci]: set -ex for official build to exit on any build failures
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-05-03 12:31:52 -07:00
Guohan Lu
aeb73ad529 [ci]: increase official build to 12 hours
10-hour limit is not enough to finish several jobs.

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-05-03 12:31:31 -07:00
Guohan Lu
e1ff8b6ad6 [ci]: change timeout to 36 hours for armhf/arm64 build
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-05-02 09:55:15 -07:00
Shilong Liu
a10542e894
[CI] Add Bldenv pipeline files (#7458)
Add 3 pipeline files:

- pipeline for build docker image sonic-slave-[buster|jessie|stretch] for amd64/armhf/arm64, and push to ACR(sonicdev-microsoft.com)
- pipeline for build docker image sonic-mgmt, and push to ACR
- pipeline for cleaning dpkg cache which are created more than 30 days.

Co-authored-by: lguohan <lguohan@gmail.com>
2021-04-30 16:35:38 -07:00
xumia
45d59a59ef
Export the azure pipeline build id for SONiC version (#7406)
Improve the SONiC version, fix the "azure pipeline build id" part

<target branch name>-<pullrequest id>.<azure pipelines build id>-<merge commit id>
Example: master-7381.11668-43df5c87
2021-04-23 17:58:46 +08:00
xumia
4bf118006a
[ci]: Fix official build not existing issue (#7408)
When submitting a new official build for broadcom, vs, it prompts a error message, which says the job is not defined.
It was caused by the default option "[]", which is not empty, it is used as the jobGroups parameter.
2021-04-22 21:56:09 -07:00
xumia
e8582ac6b1
Improve the PR build version (#7381)
Why I did it
Improve the version of the Pull Request build by changing the local branch name.

How I did it
Change the default branch name merge to [target_branch_name]-[pullrequestid].

How to verify it
For official build, the version is not changed.
For pull request build, the version as below:
2021-04-23 10:24:00 +08:00
xumia
39d877c1ad
[ci] Fix the boolean value case sensitive issue in Azure Pipelines (#7399)
Why I did it
Fix the boolean value case sensitive issue in Azure Pipelines

When passing parameters to a template, the "true" or "false" will have case sensitive issue, it should be a type casting issue.
To fix it, we change the true/false to yes/no, to escape the trap.

Support to override the job groups in the template, so PR build has chance to use different build parameters, only build simple targets. For example, for broadcom, we only build target/sonic-broadcom.bin, the other images, such as swi, debug bin, etc, will not be built.
2021-04-23 09:26:16 +08:00