'branch': Placeholder('ceph_branch'),
'sha1': Placeholder('ceph_hash'),
'teuthology_branch': Placeholder('teuthology_branch'),
+ 'teuthology_sha1': Placeholder('teuthology_sha1'),
'archive_upload': Placeholder('archive_upload'),
'archive_upload_key': Placeholder('archive_upload_key'),
'machine_type': Placeholder('machine_type'),
else:
self.suite_repo_path = util.fetch_repos(
suite_branch, test_name=self.name)
- teuthology_branch = self.choose_teuthology_branch()
+ teuthology_branch, teuthology_sha1 = self.choose_teuthology_branch()
if self.args.distro_version:
ceph_hash=ceph_hash,
ceph_repo=config.get_ceph_git_url(),
teuthology_branch=teuthology_branch,
+ teuthology_sha1=teuthology_sha1,
machine_type=self.args.machine_type,
distro=self.args.distro,
distro_version=self.args.distro_version,
log.info('skipping ceph package verification')
def choose_teuthology_branch(self):
- """Select teuthology branch, check if it is present in repo and
- return the branch name value.
+ """Select teuthology branch, check if it is present in repo and return
+ tuple (branch, hash) where hash is commit sha1 corresponding
+ to the HEAD of the branch.
The branch name value is determined in the following order:
Use ``master``.
Generate exception if the branch is not present in the repo.
+
"""
teuthology_branch = self.args.teuthology_branch
if not teuthology_branch:
if not teuthology_branch:
teuthology_branch = config.get('teuthology_branch', 'master')
- teuthology_hash = util.git_ls_remote(
+ teuthology_sha1 = util.git_ls_remote(
'teuthology',
teuthology_branch
)
- if not teuthology_hash:
+ if not teuthology_sha1:
exc = BranchNotFoundError(teuthology_branch, build_git_url('teuthology'))
util.schedule_fail(message=str(exc), name=self.name)
- log.info("teuthology branch: %s %s", teuthology_branch, teuthology_hash)
- return teuthology_branch
+ log.info("teuthology branch: %s %s", teuthology_branch, teuthology_sha1)
+ return teuthology_branch, teuthology_sha1
@property
def ceph_repo_name(self):
ceph_branch='ceph_branch',
ceph_hash='ceph_hash',
teuthology_branch='teuthology_branch',
+ teuthology_sha1='teuthology_sha1',
machine_type='machine_type',
distro='distro',
distro_version='distro_version',
ceph_branch='ceph_branch',
ceph_hash='ceph_hash',
teuthology_branch='teuthology_branch',
+ teuthology_sha1='teuthology_sha1',
machine_type='machine_type',
archive_upload='archive_upload',
archive_upload_key='archive_upload_key',