Skip to content

Commit

Permalink
teuthology: fix the problem that git_build_url defaults to github
Browse files Browse the repository at this point in the history
Signed-off-by: Sun Junnan <[email protected]>
Signed-off-by: Yang Honggang <[email protected]>

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.
  • Loading branch information
sunjunnan committed Apr 6, 2023
1 parent 8d156ae commit 52418b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions teuthology/repo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 52418b2

Please sign in to comment.