Skip to content

Commit 9dee61c

Browse files
authored
Support checking out msft repo. (sonic-net#103)
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> To enable PR testing in the msft repo, we need to ensure support for checking out its code. This PR introduces the way to enable code checkout for the msft repo. Summary: Fixes # (issue) ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [ ] New Test case - [ ] Skipped for non-supported platforms - [ ] Test case improvement ### Back port request - [ ] 202012 - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 ### Approach #### What is the motivation for this PR? To enable PR testing in the msft repo, we need to ensure support for checking out its code. This PR introduces the way to enable code checkout for the msft repo. #### How did you do it? If repo_name contains msft, we will check out msft test repo. #### How did you verify/test it? Test by pipeline. #### Any platform specific information? #### Supported testbed topology if it's a new test case? ### Documentation <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? -->
1 parent b940197 commit 9dee61c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.azure-pipelines/test_plan.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
BUILDIMAGE_REPO_FLAG = "buildimage"
2828
MGMT_REPO_FLAG = "sonic-mgmt"
2929
INTERNAL_REPO_LIST = ["Networking-acs-buildimage", "sonic-mgmt-int"]
30+
MSFT_REPO_FLAG = "msft"
3031
GITHUB_SONIC_MGMT_REPO = "https://github.com/sonic-net/sonic-mgmt"
32+
GITHUB_SONIC_MGMT_REPO_MSFT = "https://github.com/Azure/sonic-mgmt.msft"
3133
INTERNAL_SONIC_MGMT_REPO = "https://dev.azure.com/mssonic/internal/_git/sonic-mgmt-int"
3234
PR_TEST_SCRIPTS_FILE = "pr_test_scripts.yaml"
3335
SPECIFIC_PARAM_KEYWORD = "specific_param"
@@ -276,7 +278,11 @@ def create(self, topology, test_plan_name="my_test_plan", deploy_mg_extra_params
276278

277279
# If triggered by the internal repos, use internal sonic-mgmt repo as the code base
278280
sonic_mgmt_repo_url = GITHUB_SONIC_MGMT_REPO
279-
if kwargs.get("source_repo") in INTERNAL_REPO_LIST:
281+
282+
if MSFT_REPO_FLAG in repo_name:
283+
sonic_mgmt_repo_url = GITHUB_SONIC_MGMT_REPO_MSFT
284+
285+
elif kwargs.get("source_repo") in INTERNAL_REPO_LIST:
280286
sonic_mgmt_repo_url = INTERNAL_SONIC_MGMT_REPO
281287

282288
# If triggered by mgmt repo, use pull request id as the code base

0 commit comments

Comments
 (0)