From 0a2b4b5c39b90949bd81b78b4cb0a2c1373485ef Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Thu, 21 Aug 2025 10:45:17 +0200 Subject: [PATCH] teuthology/config: add teuthology_git_url option Signed-off-by: Kyr Shatskyy --- docs/siteconfig.rst | 3 +++ teuthology/config.py | 5 +++++ teuthology/repo_utils.py | 4 +++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/siteconfig.rst b/docs/siteconfig.rst index effb8219c..5de2bda53 100644 --- a/docs/siteconfig.rst +++ b/docs/siteconfig.rst @@ -74,6 +74,9 @@ Here is a sample configuration with many of the options set and documented:: # Where teuthology and ceph-qa-suite repos should be stored locally src_base_path: /home/foo/src + # Where the teuthology git repo is considered to reside. + teuthology_git_url: https://github.com/ceph/teuthology.git + # Where teuthology path is located: do not clone if present #teuthology_path: . diff --git a/teuthology/config.py b/teuthology/config.py index c2157bb0a..241b10213 100644 --- a/teuthology/config.py +++ b/teuthology/config.py @@ -155,6 +155,7 @@ class TeuthologyConfig(YamlConfig): 'ceph_git_url': None, 'ceph_qa_suite_git_url': None, 'ceph_cm_ansible_git_url': None, + 'teuthology_git_url': None, 'use_conserver': False, 'conserver_master': 'conserver.front.sepia.ceph.com', 'conserver_port': 3109, @@ -220,6 +221,10 @@ class TeuthologyConfig(YamlConfig): return (self.ceph_git_url or self.ceph_git_base_url + 'ceph-ci.git') + def get_teuthology_git_url(self): + return (self.teuthology_git_url or + self.ceph_git_base_url + 'teuthology.git') + class JobConfig(YamlConfig): pass diff --git a/teuthology/repo_utils.py b/teuthology/repo_utils.py index 79fd92eda..db6e87a8c 100644 --- a/teuthology/repo_utils.py +++ b/teuthology/repo_utils.py @@ -51,6 +51,8 @@ def build_git_url(project, project_owner='ceph'): base = config.get_ceph_cm_ansible_git_url() elif project == 'ceph': base = config.get_ceph_git_url() + elif project == 'teuthology': + base = config.get_teuthology_git_url() else: base = 'https://github.com/{project_owner}/{project}' url_templ = re.sub(r'\.git$', '', base) @@ -435,7 +437,7 @@ def fetch_teuthology(branch, commit=None, lock=True): :param commit: The sha1 to checkout. Defaults to None, which uses HEAD of the branch. :returns: The destination path """ - url = config.ceph_git_base_url + 'teuthology.git' + url = config.get_teuthology_git_url() return fetch_repo(url, branch, commit, bootstrap_teuthology, lock) -- 2.47.3