Distribution to run against
-D <distroversion>, --distro-version <distroversion>
Distro version to run against
+ --ceph-repo <ceph_repo> Query this repository for Ceph branch and SHA1
+ values [default: {default_ceph_repo}]
--suite-repo <suite_repo> Use tasks and suite definition in this repository
[default: {default_suite_repo}]
--suite-relpath <suite_relpath>
""".format(
default_machine_type=config.default_machine_type,
default_results_timeout=config.results_timeout,
+ default_ceph_repo=config.get_ceph_git_url(),
default_suite_repo=config.get_ceph_qa_suite_git_url(),
)
import logging
import os
import pwd
+import re
import time
import yaml
self.args = args
self.name = self.make_run_name()
+ if self.args.ceph_repo:
+ config.ceph_git_url = self.args.ceph_repo
if self.args.suite_repo:
config.ceph_qa_suite_git_url = self.args.suite_repo
suite_hash=suite_hash,
ceph_branch=self.args.ceph_branch,
ceph_hash=ceph_hash,
+ ceph_repo=config.get_ceph_git_url(),
teuthology_branch=teuthology_branch,
machine_type=self.args.machine_type,
distro=self.args.distro,
just keep the ceph_branch around. Otherwise use the current git branch
tip.
"""
+ repo_name = self.ceph_repo_name
if self.args.ceph_sha1:
- ceph_hash = util.git_validate_sha1('ceph', self.args.ceph_sha1)
+ ceph_hash = util.git_validate_sha1(repo_name, self.args.ceph_sha1)
if not ceph_hash:
- exc = CommitNotFoundError(self.args.ceph_sha1, 'ceph.git')
+ exc = CommitNotFoundError(
+ self.args.ceph_sha1,
+ '%s.git' % repo_name
+ )
util.schedule_fail(message=str(exc), name=self.name)
log.info("ceph sha1 explicitly supplied")
elif self.args.ceph_branch:
- ceph_hash = util.git_ls_remote('ceph', self.args.ceph_branch)
+ ceph_hash = util.git_ls_remote(repo_name, self.args.ceph_branch)
if not ceph_hash:
- exc = BranchNotFoundError(self.args.ceph_branch, 'ceph.git')
+ exc = BranchNotFoundError(
+ self.args.ceph_branch,
+ '%s.git' % repo_name
+ )
util.schedule_fail(message=str(exc), name=self.name)
log.info("ceph sha1: {hash}".format(hash=ceph_hash))
log.info("teuthology branch: %s", teuthology_branch)
return teuthology_branch
+ @property
+ def ceph_repo_name(self):
+ if self.args.ceph_repo:
+ return self._repo_name(self.args.ceph_repo)
+ else:
+ return 'ceph'
+
@property
def suite_repo_name(self):
if self.args.suite_repo:
- return self.args.suite_repo.split('/')[-1].rstrip('.git')
+ return self._repo_name(self.args.suite_repo)
else:
return 'ceph-qa-suite'
+ @staticmethod
+ def _repo_name(url):
+ return re.sub('\.git$', '', url.split('/')[-1])
+
def choose_suite_branch(self):
suite_repo_name = self.suite_repo_name
suite_repo_project_or_url = self.args.suite_repo or 'ceph-qa-suite'
archive_upload_key='archive_upload_key',
suite_repo='https://example.com/ceph/suite.git',
suite_relpath='',
+ ceph_repo='https://example.com/ceph/ceph.git',
)
output_dict = substitute_placeholders(dict_templ, input_dict)
assert output_dict['suite'] == 'suite'
distro_version=None,
suite_repo='https://example.com/ceph/suite.git',
suite_relpath='',
+ ceph_repo='https://example.com/ceph/ceph.git',
)
output_dict = substitute_placeholders(dict_templ, input_dict)
assert 'os_type' not in output_dict