Commit Graph

29 Commits

Author SHA1 Message Date
lerry-lee
db1d6ab014
[CI/CD] Use remote PR test template from sonic-mgmt master to run PR test (#15976)
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:19:04 +08:00
xumia
51e0b6ddd9
[Ci] Support to build sonic-swss-common for test (#15566) (#15582)
[Ci] Support to build sonic-swss-common for test

- Microsoft ADO **(number only)**: 24341479
2023-06-28 03:14:20 +00:00
Ye Jianquan
897caef621
[CI/CD] Refine pr test definition, remove old test jobs and testbedv2 flags (#15303) 2023-06-02 16:33:34 +08:00
Ye Jianquan
934dc224d0
[CI/CD] Migrate to SONiC Elastictest (#15275) 2023-06-02 10:39:00 +08:00
Ye Jianquan
978db8e9ba
Refine test job definition and assert logic (#14959)
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 agent pool to reduce cost and avoid congestion
2023-05-24 10:27:04 +08:00
Yutong Zhang
8fc4b05036
[TestbedV2][202012]Remove timeout in each step. (#12916)
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.

Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
2022-12-05 13:56:54 +08:00
Yutong Zhang
09a4854716
Support passing the instance numbers of a testplan. (#12880)
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:37:08 +08:00
Yutong Zhang
10c2d601ed
[202012][TestbedV2] Add dualtor test jobs using TestbedV2. (#12672)
Add dualtor test jobs using TestbedV2 in 202012 branch.

Why I did it
Add dualtor test jobs using TestbedV2 in 202012 branch.

How I did it
Add dualtor test jobs using TestbedV2 in 202012 branch.

Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
2022-11-16 13:48:19 +08:00
Ye Jianquan
95b979dfc1
[202012][TestbedV2]Migrate t0 and t1-lag to TestbedV2 (#12383) (#12454)
* [TestbedV2]Migrate t0 and t1-lag to TestbedV2 (#12383)

signed-off-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.

Remove ceos type setting

Use 202012 branch as sonic-mgmt branch

* Modify template to use 202012 branch
2022-10-27 08:13:13 +08:00
Ye Jianquan
8e7a491f3b 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 18:53:40 +00:00
Qi Luo
c7e0d50c74
[ci]: Fix the wrong branch in build step "Download sonic-buildimage.vs artifact" (#12272) 2022-10-04 14:16:56 -07:00
Liu Shilong
1e812cd990
[ci] Update azp reference to support transfering organization from Azure to sonic-net (#11605)
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:22:26 +08:00
Liu Shilong
de00b87161
[ci] Transfer organization from Azure to sonic-net for sonic-mgmt (#11559) (#11563)
Why I did it
Transfer organization from Azure to sonic-net for sonic-mgmt
2022-07-28 15:32:26 +08:00
Liu Shilong
ed728abb08
[ci] Fix test stage dependency issue. (#11386) (#11391)
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-12 17:55:01 +08:00
Liu Shilong
54de99ba23
[build] Add version files to docker image dependencies (#11192)
* [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-21 20:28:50 +08:00
Shilong Liu
4f19945b48
[ci] Enable default ACR in official/PR/UpgradeVersion pipelines. (#11052) 2022-06-09 15:58:39 +08:00
Saikrishna Arcot
3289598ea4
Split kvmtest t0 job into two jobs and run in parallel (#10044) (#10858)
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>
(cherry picked from commit 44028723ef)

Co-authored-by: Zhaohui Sun <94606222+ZhaohuiS@users.noreply.github.com>
2022-06-03 09:39:30 -07:00
Saikrishna Arcot
ee84ba81ed
Use 202012 branch for sonic-mgmt (#10851)
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2022-05-17 14:59:31 -07:00
Qi Luo
3fa538e58c
Revert "[ci] Set default ACR in UpgrateVersion/PR/official pipeline. (#10341)" (#10535)
This reverts commit f4bbcd1cf1. The original one was missing one file ".azure-pipelines/azure-pipelines-repd-build-variables.yml" and break the Azure pipeline.
2022-04-11 23:53:42 -07:00
Shilong Liu
f4bbcd1cf1 [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 11:19:10 +08:00
xumia
3ca38b2eb6
[Build]: Enable the PR reproducible build (#10241)
[Build]: Enable the PR reproducible build
2022-03-16 12:23:04 +08:00
xumia
05351731d5
[Build]: Enable arm pr check #9362
Support marvell-armhf dpkg cache and the azp check.
Waiting for merging PR #9381 to 202012 branch, so only azp template change in this PR.

Move the VS build to a new stage BuildVS, change the Test stage only depending on BuildVS, running the BuildVS and the other platform's build in parallel. The Test stage do not has dependency on the marvel-armhf build, reduce the overall build time caused by longer build time of marvel-armhf build.
2021-12-04 09:31:53 +08:00
Guohan Lu
4d2acead7c [ci]: increase the t0 kvm test limit to 5 hours
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-09-02 01:24:49 -07:00
Shilong Liu
6b69ddc861 [build] Fix reproducible build issues (#8548)
* [build] Fix reproducible build issues
2021-08-26 10:22:02 +00:00
Guohan Lu
7fc11cf441 [ci]: fix artifact download syntax error for vstest (#8547)
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-08-21 14:31:22 -07:00
xumia
fd8e84ac50 [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-25 11:35:57 -07:00
Shilong Liu
e45d636b77 fix 2021-04-25 11:35:57 -07:00
lguohan
65ac29627d
[ci]: add ci/pr build for 202012 (#7039)
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-03-13 23:27:26 -08:00
lguohan
6a73f86dc3 Set up CI with Azure Pipelines
[skip ci]
2020-11-26 04:18:25 -08:00