From 52418b250da677b7601e3a748a99d9844a962111 Mon Sep 17 00:00:00 2001 From: sunjunnan Date: Fri, 10 Mar 2023 09:19:57 +0000 Subject: [PATCH] teuthology: fix the problem that git_build_url defaults to github Signed-off-by: Sun Junnan Signed-off-by: Yang Honggang The build_git_url function creates a github connection by default when the project name does not belong to one of ceph,ceph-cm-ansible,ceph-qa-suite. Modify the function to achieve that if project name is not one of the above three, create the ceph_git_base_url connection in the teutology.yaml file. --- teuthology/repo_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teuthology/repo_utils.py b/teuthology/repo_utils.py index 93ee225a3..7f387d95e 100644 --- a/teuthology/repo_utils.py +++ b/teuthology/repo_utils.py @@ -51,9 +51,9 @@ def build_git_url(project, project_owner='ceph'): elif project == 'ceph': base = config.get_ceph_git_url() else: - base = 'https://github.com/{project_owner}/{project}' + base = '{ceph_git_base_url}/{project_owner}/{project}' url_templ = re.sub(r'\.git$', '', base) - return url_templ.format(project_owner=project_owner, project=project) + return url_templ.format(ceph_git_base_url=config.ceph_git_base_url, project_owner=project_owner, project=project) def ls_remote(url, ref):