Skip to content

Commit 0a2b4b5

Browse files
author
Kyr Shatskyy
committed
teuthology/config: add teuthology_git_url option
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
1 parent c9986ad commit 0a2b4b5

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

docs/siteconfig.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ Here is a sample configuration with many of the options set and documented::
7474
# Where teuthology and ceph-qa-suite repos should be stored locally
7575
src_base_path: /home/foo/src
7676

77+
# Where the teuthology git repo is considered to reside.
78+
teuthology_git_url: https://github.com/ceph/teuthology.git
79+
7780
# Where teuthology path is located: do not clone if present
7881
#teuthology_path: .
7982

teuthology/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ class TeuthologyConfig(YamlConfig):
155155
'ceph_git_url': None,
156156
'ceph_qa_suite_git_url': None,
157157
'ceph_cm_ansible_git_url': None,
158+
'teuthology_git_url': None,
158159
'use_conserver': False,
159160
'conserver_master': 'conserver.front.sepia.ceph.com',
160161
'conserver_port': 3109,
@@ -220,6 +221,10 @@ def get_ceph_git_url(self):
220221
return (self.ceph_git_url or
221222
self.ceph_git_base_url + 'ceph-ci.git')
222223

224+
def get_teuthology_git_url(self):
225+
return (self.teuthology_git_url or
226+
self.ceph_git_base_url + 'teuthology.git')
227+
223228

224229
class JobConfig(YamlConfig):
225230
pass

teuthology/repo_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ def build_git_url(project, project_owner='ceph'):
5151
base = config.get_ceph_cm_ansible_git_url()
5252
elif project == 'ceph':
5353
base = config.get_ceph_git_url()
54+
elif project == 'teuthology':
55+
base = config.get_teuthology_git_url()
5456
else:
5557
base = 'https://github.com/{project_owner}/{project}'
5658
url_templ = re.sub(r'\.git$', '', base)
@@ -435,7 +437,7 @@ def fetch_teuthology(branch, commit=None, lock=True):
435437
:param commit: The sha1 to checkout. Defaults to None, which uses HEAD of the branch.
436438
:returns: The destination path
437439
"""
438-
url = config.ceph_git_base_url + 'teuthology.git'
440+
url = config.get_teuthology_git_url()
439441
return fetch_repo(url, branch, commit, bootstrap_teuthology, lock)
440442

441443

0 commit comments

Comments
 (0)