import fcntl
import logging
import os
+import re
import shutil
import subprocess
import time
return False
+def build_git_url(project, project_owner='ceph'):
+ """
+ Return the git URL to clone the project
+ """
+ if project == 'ceph-qa-suite':
+ base = config.get_ceph_qa_suite_git_url()
+ elif project == 'ceph':
+ base = config.get_ceph_git_url()
+ else:
+ base = 'https://github.com/{project_owner}/{project}'
+ url_templ = re.sub('\.git$', '', base)
+ return url_templ.format(project_owner=project_owner, project=project)
+
+
def ls_remote(url, ref):
"""
Return the current sha1 for a given repository and ref
import copy
import logging
import os
-import re
import requests
import smtplib
import socket
from ..repo_utils import fetch_qa_suite, fetch_teuthology
from ..orchestra.opsys import OS
from ..packaging import get_builder_project
+from ..repo_utils import build_git_url
from ..task.install import get_flavor
log = logging.getLogger(__name__)
return None
-def build_git_url(project, project_owner='ceph'):
- """
- Return the git URL to clone the project
- """
- if project == 'ceph-qa-suite':
- base = config.get_ceph_qa_suite_git_url()
- elif project == 'ceph':
- base = config.get_ceph_git_url()
- else:
- base = 'https://github.com/{project_owner}/{project}'
- url_templ = re.sub('\.git$', '', base)
- return url_templ.format(project_owner=project_owner, project=project)
-
-
def git_branch_exists(project, branch, project_owner='ceph'):
"""
Query the git repository to check the existence of a project's branch