Commit Graph

82 Commits

Author SHA1 Message Date
Liu Shilong
fb2c3cdf14
[ci] Use correct branch when downloading SONiC vs image in elastic test. (#17873)
Why I did it
Use dynamic variable for branch reference.

Work item tracking
Microsoft ADO (number only): 26563706
How I did it
How to verify it
2024-01-25 19:00:04 +08:00
Liu Shilong
2532661cd9
[ci] Enable sonic-restapi build in PR validation. (#17397)
Why I did it
Enable sonic-restapi build in two platform to avoid build break on restapi target.

Work item tracking
Microsoft ADO (number only): 26048426
How I did it
How to verify it
2023-12-15 16:25:26 +08:00
Yaqiang Zhu
22b18e562f
[dhcp_server] Set to build dhcp_server image in vs image (#17340)
Currently in this repo would not build dhcp_server container image by default, which would cause that building issue for dhcp_server introduced by other modules cannot be noticed in time.
This PR is to set build dhcp_server container in vs image.
2023-11-30 13:52:54 -08:00
Saikrishna Arcot
277507a0dc Disable FIPS for Bookworm
FIPS packages for Bookworm are not yet available. Disable FIPS until
those packages are ready.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2023-11-21 18:53:15 -08:00
Ze Gan
17a98ea772
[ci]: Add dpu topo (#16723)
Enable an Azp job for checking DPU scenario.

Signed-off-by: Ze Gan <ganze718@gmail.com>
2023-10-25 22:34:49 -07:00
Saikrishna Arcot
ac39220a77
[ci]: Install swig and nlohmann-json3-dev for vstest (#16609)
vstest needs to compile swss-common locally, and the above two packages
will soon be required.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2023-09-23 00:03:36 -07:00
Saikrishna Arcot
f27aac7f0b
[ci] For vstest, make sure kernel modules are built and installed (#16479)
* [ci] For vstest, make sure kernel modules are built and installed

Make sure that the agent that vstest runs on has the team module
available. If it is not available, then build and install it.

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

* Use version of script that's checked into sonic-swss-common

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

---------

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2023-09-11 21:54:40 -07:00
Liu Shilong
ea34cb2f0a
[ci] Add PR checker for rpc target and debug target. (#15997)
Why I did it
Enable rpc target in PR checker to avoid build break for rpc target.

Work item tracking
Microsoft ADO (number only): 24708372
How I did it
How to verify it
2023-08-01 21:03:49 +08:00
lerry-lee
dda6bd11f2
[CI/CD] Use remote PR test template from sonic-mgmt master to run PR test (#15975)
Why I did it
Use remote PR test template from sonic-mgmt master to run PR test.

How I did it
Modify PR test azure pipeline yml file.

How to verify it
PR test executing normally.

Signed-off-by: Chun'ang Li <chunangli@microsoft.com>
2023-08-01 16:18:35 +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
xumia
f0617c7f9a
[Ci] Support to build sonic-swss-common for test (#15566)
#### Why I did it
[Ci] Support to build sonic-swss-common for test

##### Work item tracking
- Microsoft ADO **(number only)**: 24341479
2023-06-27 14:40:20 -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
96cac8e918
[ci] Add marvell-arm64 build in PR checks. (#15356)
Why I did it
Add marvell-arm64 platform build in PR checks to avoid build break.

Work item tracking
Microsoft ADO (number only): 17257160
How I did it
How to verify it
2023-06-08 09:40:20 +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
d466910ff3
[CI/CD] Migrate to SONiC Elastictest (#15276) 2023-06-02 10:39:04 +08:00
Ye Jianquan
b45cea9e41
Refine test job definition and assert logic (#14958)
Why I did it
Remove 'kvmtest-t0' and 'kvmtest-t1-lag' test jobs since all the test jobs are required (continueOnError: false) already, and will only enable one of classical and testbedV2 tests, no need to do an unnecessary 'or' compute test job.
Change classic multi-asic and t0-sonic test jobs as required (continueOnError: false) following current testbedV2's logic.
2023-05-11 14:07:11 +08:00
Liu Shilong
2ba2ff1398
[ci] Migrate test jobs to vmss agent pool to increase node limit. (#14127)
Why I did it
original ubuntu-20.04 agent pool has a node limit 35.
Use vmss agent pool to get higher node limit.

How I did it
2023-03-07 21:14:04 +08:00
Liu Shilong
538201af65
[ci] Build debug image in PR checks. (#14058)
Why I did it
Add checks for debug image in PR checks.
2023-03-03 10:45:12 +08:00
Yutong Zhang
4de98ffecb
[TestbedV2][master]Set all jobs mandatory in pipeline. (#12938)
Recently, the job of t0-sonic, multi-asic and wan run stably in master branch, so in this pr, I set them mandatory in azure pipeline.

Why I did it
Recently, the job of t0-sonic, multi-asic and wan run stably in master branch, so in this pr, I set them mandatory in azure pipeline.

How I did it
Modify the value of continueOnError in each job from `true` to `false`.

Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
2022-12-06 10:19:54 +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
Yutong Zhang
df4312f7ef
Support passing the instance numbers of a testplan. (#12879)
Previously, we hard code the min and max numbers of instance in a plan. In this pr, we support passing the instance numbers of a testplan.

Why I did it
Previously, we hard code the min and max numbers of instance in a plan. In this pr, we support passing the instance numbers of a testplan.

How I did it
Use a variable to set the instance number.
2022-11-30 22:36:55 +08:00
Yutong Zhang
68805fbd06
[TestbedV2] Add wan topo test using TestbedV2. (#12751)
Add wan topo test using TestbedV2.

Why I did it
Add wan topo test using TestbedV2.

How I did it
Add a job to run wan topo in pr test.

Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
2022-11-21 10:34:23 +08:00
Yutong Zhang
5aa03246fc
[master][TestbedV2] Migrate multi-asic test jobs to TestbedV2. (#12668)
Migrate multi-asic test jobs to TestbedV2.

Why I did it
Migrate multi-asic test jobs to TestbedV2.

How I did it
Add one parameter num_asic to create testplan.
Modify azure-pipelines.yml to run multi-asic on tbv2.

Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
2022-11-11 10:54:37 +08:00
Yutong Zhang
7c746e67d2
[master][TestbedV2] migrate t0-sonic test jobs to TestbedV2. (#12651)
Migrate t0-sonic test jobs to TestbedV2.

Why I did it
Migrate t0-sonic test jobs to TestbedV2.

How I did it
Add two parameters to create testplan.
Modify azure-pipelines.yml to run t0-sonic on tbv2.

Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
2022-11-10 15:27:31 +08:00
Yutong Zhang
dc0ceaa500
[TestbedV2] Add dualtor test using TestbedV2. (#12601)
Add dualtor test using TestbedV2 in buildimage repo.

Why I did it
Add dualtor test using TestbedV2 in buildimage repo.

How I did it
Add dualtor test using TestbedV2 in buildimage repo.

Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
2022-11-07 19:48:06 +08:00
Liu Shilong
3df031c9b1
[ci] Add azp trigger for future release branches. (#12508) 2022-10-27 17:36:43 +08:00
xumia
158371de38
[Ci] clean up the old artifacts in the agent before downloading the new artifacts (#12391)
Ci] clean up the old artifacts in the agent before downloading the new artifacts
2022-10-25 15:45:01 +08:00
Liu Shilong
1dec49005b
[ci] Fix test job issue on checkout step (#12445) 2022-10-20 13:06:10 +08:00
Ye Jianquan
ef0559c030
[TestbedV2]Migrate t0 and t1-lag to TestbedV2 (#12383)
co-authorized by: jianquanye@microsoft.com

Migrate the t0 and t1-lag test jobs in buildimage repo to TestbedV2.

Why I did it
Migrate the t0 and t1-lag test jobs in buildimage repo to TestbedV2.

How I did it
Migrate the t0 and t1-lag test jobs in buildimage repo to TestbedV2.
2022-10-19 13:33:17 +08:00
Ye Jianquan
2bf2e02719
Enable to cancel pipeline jobs during checkout code and tests (#12436)
co-authorized by: jianquanye@microsoft.com

Why I did it
Now, checkout code step and KVM test job can't be cancelled even though the whole build is cancelled.
That's because by using Azure Pipeline Conditions, we customized the running condition, and we need to react to the Cancel action explicitly by asserting 'succeeded'
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops#succeeded
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml#ive-got-a-conditional-step-that-runs-even-when-a-job-is-canceled-how-do-i-manage-to-cancel-all-jobs-at-once

How I did it
Assert 'succeeded' condition explicitly.

How to verify it
Verified by cancelling and rerunning the azure pipeline.
2022-10-19 12:26:50 +08:00
Hua Liu
004a8b6eae
[AzurePipeline] Fix vstest step failed by libyang missing. (#12240)
Why I did it
Fix PR merge failed because 'vstest' step does not install libyang.

How I did it
Install libyang in azure pipeline.

How to verify it
Pass vstest step.
2022-09-30 15:56:46 +08:00
Ye Jianquan
5510d9c03b
Make t0 part1 and part2 be able to be rerun if failed (#12221)
Why I did it
With continueOnError: true, a failed job returns the result: partiallySuccess, which cause it can't be rerun, since AZP consider it as passed. Then we can't only rerun t0 jobs when it fails.

How I did it
Mark t0 part1 and part2 as continueOnError: false.

How to verify it
The pipeline will verify it.
2022-09-30 08:17:01 +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
35945c9015
[ci] Update reproducible build related pipeline. (#11810) 2022-08-29 11:26:15 +08: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
Stephen Sun
b29dda2bea
Extend t1-lag timeout to 360 (#11478)
Signed-off-by: Stephen Sun <stephens@nvidia.com>
2022-08-01 08:25:18 -07:00
Liu Shilong
746e052104
[ci] Transfer organization from Azure to sonic-net for sonic-mgmt (#11559)
Why I did it
Transfer organization from Azure to sonic-net for sonic-mgmt
2022-07-28 14:54:25 +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
SuvarnaMeenakshi
37d7e87792
[multi-asic]: Add build param to build multi-asic KVM image. (#11453)
Why I did it
[multi-asic]: Add build param to build multi-asic KVM image.
Require sonic-4asic-vs.img.gz to run multi-asic tests.
BUILD_MULTIASIC_KVM=y has to be added to build parameter to generate multi-asic KVM image which can be eventually used in multi-asic VS testbed.
This is a pipeline that we currently have to generate multi-asic KVM image:
https://github.com/Azure/sonic-buildimage/blob/master/.azure-pipelines/official-build-multi-asic.yml

How I did it
Add BUILD_MULTIASIC_KVM=y to build parameter in pipeline script to generate multi-asic KVM image.

How to verify it
The build param is already used in official-build-multi-asic.yml pipeline.
2022-07-18 17:42:17 -07:00
Liu Shilong
5223f4917f
[ci] Update azp template variable for reproducible build. (#11419) 2022-07-13 17:30:23 +08:00
Liu Shilong
205eb59a6d
[ci] Fix test stage dependency issue. (#11386)
Why I did it
When any of the test job failed in the test stage, the rerun will not work, the test stage will be skipped automaticall, so we do not have chance to rerun the test stage again, and the checks of the test will be always in failed status, block the PR to merge forever.

It should be caused by the condition in the Test stage, we should specify the status of the BuildVS stage.

How I did it
Fix stage dependency logic.
2022-07-08 11:32:30 +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
Ying Xie
8f47df6ae3
[pr test] increase T1-lag PR test timeout to 5 hours (#11029)
Why I did it
Some PR test are timing out on T1-lag kvm test.

How I did it
Increase the timeout to 5 hours.

How to verify it
Test on this PR.

Signed-off-by: Ying Xie ying.xie@microsoft.com
2022-06-05 08:23:02 -07: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
8ec8900d31
Support SONiC OpenSSL FIPS 140-3 based on SymCrypt engine (#9573)
Why I did it
Support OpenSSL FIPS 140-3, see design doc: https://github.com/Azure/SONiC/blob/master/doc/fips/SONiC-OpenSSL-FIPS-140-3.md.

How I did it
Install the fips packages.
To build the fips packages, see https://github.com/Azure/sonic-fips
Azure pipelines: https://dev.azure.com/mssonic/build/_build?definitionId=412

How to verify it
Validate the SymCrypt engine:

admin@sonic:~$ dpkg-query -W | grep openssl
openssl 1.1.1k-1+deb11u1+fips
symcrypt-openssl        0.1

admin@sonic:~$ openssl engine -v | grep -i symcrypt
(symcrypt) SCOSSL (SymCrypt engine for OpenSSL)
admin@sonic:~$
2022-05-06 07:21:30 +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
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
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
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
Stephen Sun
0aebad9fe9
[ci]: Extend timeout for kvm-t0 test from 300 minutes to 360 minutes (#9336)
Recently a lot of PRs didn't pass azure pipeline kvm v0 test due to timeout

Signed-off-by: Stephen Sun <stephens@nvidia.com>
2021-11-22 09:54:27 -08:00