Commit Graph

106 Commits

Author SHA1 Message Date
Liu Shilong
c968114a36
[ci] Use absolute template file path in docker-sonic-slave pipeline. (#12153) 2022-09-23 12:54:57 +08:00
Liu Shilong
8211c850f1
[ci] Update docker sonic slave pipeline to build slave base docker (#11908)
* [ci] Update docker sonic slave pipeline to build slave base docker
2022-09-21 15:50:30 +08:00
Ye Jianquan
750e1b3017
Define whether a test is required by code (#11921)
* Define whether a test is required by code

Why I did it
Define whether a test job is required before merging by code.
Let the failure of multi-asic and t0-sonic don't block pr merge.
The 'required' configuration can be modified by the owner in the future.

How I did it
Required:
t1-lag, t0
Not required:
multi-asic, t0-sonic

How to verify it
AZP itself verifies it.

Signed-off-by: jianquanye@microsoft.com
2022-09-03 06:53:54 +08:00
Liu Shilong
cf69206d02
[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-08-30 14:23:09 +08:00
Liu Shilong
35945c9015
[ci] Update reproducible build related pipeline. (#11810) 2022-08-29 11:26:15 +08:00
Saikrishna Arcot
adffbd4643
Build the Broadcom DNX RPC container as part of the official build (#11829)
With the Broadcom syncd containers getting upgraded to Bullseye, the DNX
RPC container is no longer automatically built. Explicitly add a make
command to build it.

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

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2022-08-24 11:42:15 -07:00
Liu Shilong
9ff2e2cff3
[ci] Update azp reference to support transfering organization from Azure to sonic-net (#11601)
Why I did it
When transfer repo to another organization, azp reference also need change.
Change azp reference to avoid pipeline failure.
2022-08-02 16:24:14 +08:00
xumia
6f323b3e83
[ci] Support the cross build for armhf/arm64 (#11587)
Why I did it
[ci] Support the cross build for armhf/arm64
2022-08-01 11:31:02 +08:00
SuvarnaMeenakshi
6e7616b504
[multi-asic]: Add job to run multi-asic VS tests in sonic-buildimage pipeline (#11517)
Why I did it
Require multi-asic VS tests to be run during PR checks and merges in master branch.

How I did it
Add job to run multi-asic VS tests in sonic-buildimage pipeline. Currently pipeline will run basic bgp fact test to ensure the testbed comes up, load minigraph works and bgp sessions are up.
Use new multi-asic VS agent pool sonictest-ma in official-multi-asic-vs pipeline
Make multi-asic VS test optional for now. There are two known issues:
Announce route failure during refresh-dut in setup testbed stage.
bgp sessions not getting established.
How to verify it
Tested using test azure pipelines.
2022-07-27 11:47:00 -07:00
xumia
af2dea9c7f
[ci] Fix some not sai package removed issue (#11544)
Only replace the file name starts with "cisco-".
2022-07-27 09:58:04 -07:00
Liu Shilong
d7101963f1
[ci] Disable reproducible build in master branch official build (#11452) 2022-07-18 12:45:05 +08:00
Liu Shilong
77c224b0fd
[ci] Add vstest skip folder sonic-slave-* (#11295) 2022-07-15 13:13:58 +08:00
Liu Shilong
5223f4917f
[ci] Update azp template variable for reproducible build. (#11419) 2022-07-13 17:30:23 +08:00
Yakiv Huryk
1568667011
[ci] add docker-sonic-vs with ASAN build (#11297)
The asan-enabled docker image will be used in other CIs that run DVS tests.

Why I did it
To add a possibility to run DVS tests with ASAN for other CIs (e.g. swss).

How I did it
Added the 'asan_image' flag to the vs job group.

How to verify it
Run the CI and check the docker-sonic-vs-asan.gz artifact.
2022-07-04 08:40:04 +08:00
Ze Gan
0ae4903ef9
[azurepipeline]: Add t0-sonic pool back to Azp checker (#11181)
Why I did it
The t0-sonic pool has been fixed, so add it back to azp checker.

How I did it
Remove continueOnError in run-test-template.yml.

Signed-off-by: Ze Gan <ganze718@gmail.com>
2022-06-21 15:47:06 +08:00
Shilong Liu
2851884c8b
[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-17 15:39:41 +08:00
xumia
b6811a58cf
[Build] Improve docker build performance (#11111)
Why I did it
The docker storage driver vfs is not a good option for build, it uses the “deep copy” when building a new layer, leads to lower performance and more space used on disk than other storage drivers.
A better docker storage driver is the default one overlay2, it is a modern union filesystem.
2022-06-16 14:13:01 +08:00
xumia
5072315c89
[Ci]: Fix the target directory not empty issue when publishing artifacts #10972
Why I did it
Fix the target directory not empty issue when publishing artifacts.
Some of the artifacts are published to $(Build.ArtifactStagingDirectory)/target/ before source code checked out.
2022-05-30 16:50:06 +08:00
Shilong Liu
650b00e41e
[ci] Publish logs when building image job is canceled by timeout. (#10919) 2022-05-30 16:02:27 +08:00
Ze Gan
2faa69eed2
[Azp]: Ignore the result of t0-sonic pool (#10905)
Signed-off-by: Ze Gan <ganze718@gmail.com>
2022-05-24 10:42:09 +08:00
Shilong Liu
b313563986
[ci] Add arm artifacts in common lib azure pipeline (#10817)
* [ci] Add arm artifacts in common lib azure pipeline
2022-05-23 17:52:56 +08:00
xumia
f6927606b3
[Ci]: Fix to trigger the publish pipeline in failure build issue (#10847)
Why I did it
It is not necessary to trigger the publish pipeline when build is failed.

How I did it
Remove the condition in the azp task, change to use template condition.
2022-05-20 14:32:53 +08:00
xumia
3567888b03
[Ci] Support to trigger a pipeline to download and publish artifacts to storage (#10820)
Why I did it
Support to trigger a pipeline to download and publish artifacts to storage and container registry.
Support to specify the patterns which docker images to upload.

How I did it
Pass the pipeline information and the artifact information by pipeline parameters to the pipeline which will be triggered a new build. It is to decouple the artifacts generation and the publish logic, how and where the artifacts/docker images will be published, depends on the triggered pipeline.

How to verify it
2022-05-16 08:57:26 +08:00
Ze Gan
992d233090
Add pool: sonictest-sonic-t0 (#10635)
Signed-off-by: Ze Gan <ganze718@gmail.com>

Existing pools cannot test MACsec scenario, So I add sonictest-sonic-t0 pool that can run MACsec testcases.
2022-05-12 13:21:25 +08:00
xumia
508dda6ad3
[Ci]: Support to sign image for cisco-8000 uefi secure boot (#10616)
Why I did it
[Ci]: Support to sign image for cisco-8000 uefi secure boot
2022-04-21 12:13:09 +08:00
Shilong Liu
0a99f87bec
[ci] Update common lib pipeline to build more distribute packages. (#10576) 2022-04-19 10:32:01 +08:00
xumia
f24a04fa3d
[Ci]: check if there is a sonic dirty version issue (#10445)
Why I did it
[Ci]: check if there is a sonic dirty version issue
If there is a dirty version issue in PR build, the build will be failed.
2022-04-08 10:49:21 +08:00
Shilong Liu
51e4e8068e
[ci] Fix a docker-sonic-slave pipeline format in variable reference. (#10494)
this issue affect official amd64 docker-sonic-slave build.
2022-04-08 10:46:59 +08:00
xumia
baa24b3cb1
[Ci]: exclude innovium build and increase broadcom build timeout (#10482)
Why I did it
Exclude the innovium build in upgrading version build, currently, the builds are always failed, exclude the build temporarily.
Increase the broadcom build timeout.
2022-04-07 20:04:43 +08:00
Shilong Liu
0330253fd7
[ci] Fix issues in docker-slave official build. (#10477)
only push latest tag on master build
2022-04-07 13:02:35 +08:00
xumia
3391969d2e
[Ci]: Fix the docker slave azp template issue (#10453)
Why I did it
[Ci]: Fix the docker slave azp template issue
2022-04-06 11:34:02 +08:00
xumia
e1c36dbfc1
[Ci]: Fix an azp template syntax error (#10446)
Why I did it
[Ci]: Fix an azp template syntax error
See https://dev.azure.com/mssonic/build/_build/results?buildId=86535&view=results

/.azure-pipelines/docker-sonic-slave.yml (Line: 62, Col: 47): Expected a mapping
2022-04-04 07:06:44 +08:00
xumia
1bf8bc6091
[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 22:37:34 +08:00
Shilong Liu
12cfb2b8f4
[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-02 07:48:44 +08:00
Lawrence Lee
0f488a8cb6
[azp]: Fix type in slave container cleanup (#10424)
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
2022-04-01 16:22:54 +08:00
Shilong Liu
a9a37c8ba1
[ci] Fix docker-sonic-slave-template issue for resources. (#10414)
Why I did it
Fix bug for wrong resources position.
2022-04-01 16:19:48 +08:00
Shilong Liu
c03bf075f7
[ci] Add azure pipeline to build common libs. (#10367)
Why I did it
To remove reference on Azure.sonic-buildimage artifacts.
Azure.sonic-buildimage has a higher failure rate.
2022-03-31 13:14:55 +08:00
Shilong Liu
8f01c7fba6
[build] Fix issues found in reproducible build. (#10407) 2022-03-31 13:07:46 +08:00
Shilong Liu
d8b80d2317
[ci] Use template from master branch in UpgrateVersion/sonic-slave pipeline (#10380) 2022-03-31 12:40:19 +08:00
xumia
ced22db1e3
[Build]: fix ENABLE_DOCKER_BASE_PULL not working issue in armhf/arm64 (#10330)
Why I did it
Fix ENABLE_DOCKER_BASE_PULL not working issue in armhf/arm64
For build in native armhf/arm64, the expected container registry repo name is sonic-slave-<stretch|buster|bullseye>

How I did it
Publish the slave image to sonic-slave-<stretch|buster|bullseye>.
2022-03-30 14:43:51 +08:00
xumia
8f418bb652
[Build]: Enable marvell-armhf PR check (#10259)
Why I did it
[Build]: Enable marvell-armhf PR check
Improve the azp dependencies, make the Test stage only depended on BuildVS stage. The Test stage will be triggered once the BuildVS stage finished, reduce the waiting time.
2022-03-23 22:36:53 +08:00
Shilong Liu
90416b565c
[ci] Fix remove sonic-slave-* docker image issue when building sonic-slave* (#10296) 2022-03-22 12:51:07 +08:00
xumia
49ac9f9005
[Build]: Support to set jobFilters (#10280)
[Build]: Support to set jobFilters
2022-03-21 10:27:24 +08:00
xumia
14921e39d1
[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 10:15:52 +08:00
Qi Luo
c9cf4d9ff0
sonic-slave-buster pins the versions of Jinja2 and MarkupSafe in py3 (#10043)
#### Why I did it
Upstream breaking change, ref discussion https://github.com/pallets/markupsafe/issues/282
2022-02-24 17:00:13 -08:00
Zhaohui Sun
44028723ef
Split kvmtest t0 job into two jobs and run in parallel (#10044)
Why I did it
Introduce 2 sub jobs for kvmtest t0 job in sonic-mgmt repo in PR Azure/sonic-mgmt#4861
But in sonic-buildimage repo, because section parameter is null, it always run the part 2 test scripts in kvmtest t0 job.
It missed the part 1 test scripts in kvmtest.sh.

How I did it
Split kvmtest t0 job into two sub jobs such as sonic-mgmt repo and run them in parallel to save time.

How to verify it
Submit PR will trigger the pipeline to run.

Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
2022-02-24 10:20:24 +08:00
Mohamed Ghoneim
f21a45b68a
[build] fix build exception and revert #9136 (#10037)
#### Why I did it

1. Fix Build exception [example](https://dev.azure.com/mssonic/build/_build/results?buildId=73911&view=logs&jobId=88ce9a53-729c-5fa9-7b6e-3d98f2488e3f&j=cef3d8a9-152e-5193-620b-567dc18af272&t=ac3bce9f-b126-5a26-3fee-28ce0ec1679d)

```
2022-02-19T01:54:23.4200556Z ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/lib/python3.8/dist-packages/markupsafe/__init__.py)
```

This is because Jinja2 uses MarkupSafe without specifying an upper limit to the version, MarkupSafe version that was released today removed 'soft_unicode'. So now Jinja2 is complaining.

Related issues:
https://github.com/pallets/jinja/issues/1591
https://github.com/aws/aws-sam-cli/issues/3661


2. Reverts #9136

Fixing build failures in SONiC utils [example](https://dev.azure.com/mssonic/build/_build/results?buildId=73784&view=logs&jobId=83516c17-6666-5250-abde-63983ce72a49&j=83516c17-6666-5250-abde-63983ce72a49&t=6177235f-d4f1-5f72-835a-90ebb93a1784)

One of the errors:
```
 TestPathAddressing.test_find_ref_paths__ref_is_the_whole_key__returns_ref_paths 

self = <tests.generic_config_updater.gu_common_test.TestPathAddressing testMethod=test_find_ref_paths__ref_is_the_whole_key__returns_ref_paths>

    def test_find_ref_paths__ref_is_the_whole_key__returns_ref_paths(self):
        # Arrange
        path = "/PORT/Ethernet0"
        expected = [
            "/ACL_TABLE/NO-NSW-PACL-V4/ports/0",
            "/VLAN_MEMBER/Vlan1000|Ethernet0",
        ]
    
        # Act
        actual = self.path_addressing.find_ref_paths(path, Files.CROPPED_CONFIG_DB_AS_JSON)
    
        # Assert
>       self.assertEqual(expected, actual)
E       AssertionError: Lists differ: ['/ACL_TABLE/NO-NSW-PACL-V4/ports/0', '/VLAN_MEMBER/Vlan1000|Ethernet0'] != ['/ACL_TABLE/NO-NSW-PACL-V4/ports/0']
E       
E       First list contains 1 additional elements.
E       First extra element 1:
E       '/VLAN_MEMBER/Vlan1000|Ethernet0'
E       
E       - ['/ACL_TABLE/NO-NSW-PACL-V4/ports/0', '/VLAN_MEMBER/Vlan1000|Ethernet0']
E       + ['/ACL_TABLE/NO-NSW-PACL-V4/ports/0']
```

The VLAN_MEMBER backlink (can be called referrer link or ref link) is not found.

Issue introduced by https://github.com/Azure/sonic-buildimage/pull/9136
I don't know how this PR passed the build system, it should have failed.

Known YANG issue https://github.com/Azure/sonic-buildimage/issues/9312

#### How I did it
The import to `sonic-vlan` is breaking the build
```
    import sonic-vlan {
        prefix vlan;
    }
```

I am not sure if that's the only issue, so I think reverting the whole PR should be the safer option.

#### How to verify it
Ran sonic-utils tests locally.
2022-02-21 11:07:29 -08:00
xumia
dbdce62efe
[Bug][Build]: Fix azp trigger branches error (#9668)
The character "?" is not supported in azp template trigger branches, only support *.
2022-01-04 19:55:30 +08:00
xumia
faab7d5991
[Build]: Support reproducible build for release branches (#9426)
[Build]: Support reproducible build for release branches #9426
2021-12-23 16:16:55 +08:00
xumia
471a31fce0
[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>
2021-12-03 21:23:09 -08:00