mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
Merge pull request #12538 from liewegas/wip-workunits
qa/tasks/workunit: retry on ceph.git if checkout fails Reviewed-by: Josh Durgin <jdurgin@redhat.com>
This commit is contained in:
commit
26ab33ae79
@ -309,19 +309,41 @@ def _run_tests(ctx, refspec, role, tests, env, subdir=None, timeout=None):
|
|||||||
srcdir = '{cdir}/qa/workunits'.format(cdir=clonedir)
|
srcdir = '{cdir}/qa/workunits'.format(cdir=clonedir)
|
||||||
|
|
||||||
git_url = teuth_config.get_ceph_git_url()
|
git_url = teuth_config.get_ceph_git_url()
|
||||||
remote.run(
|
try:
|
||||||
logger=log.getChild(role),
|
remote.run(
|
||||||
args=[
|
logger=log.getChild(role),
|
||||||
'git',
|
args=[
|
||||||
'clone',
|
'git',
|
||||||
|
'clone',
|
||||||
|
git_url,
|
||||||
|
clonedir,
|
||||||
|
run.Raw(';'),
|
||||||
|
'cd', '--', clonedir,
|
||||||
|
run.Raw('&&'),
|
||||||
|
'git', 'checkout', refspec,
|
||||||
|
],
|
||||||
|
)
|
||||||
|
except CommandFailedError:
|
||||||
|
alt_git_url = git_url.replace('ceph-ci', 'ceph')
|
||||||
|
log.info(
|
||||||
|
"failed to check out '%s' from %s; will also try in %s",
|
||||||
|
refspec,
|
||||||
git_url,
|
git_url,
|
||||||
clonedir,
|
alt_git_url,
|
||||||
run.Raw(';'),
|
)
|
||||||
'cd', '--', clonedir,
|
remote.run(
|
||||||
run.Raw('&&'),
|
logger=log.getChild(role),
|
||||||
'git', 'checkout', refspec,
|
args=[
|
||||||
],
|
'git',
|
||||||
)
|
'clone',
|
||||||
|
alt_git_url,
|
||||||
|
clonedir,
|
||||||
|
run.Raw(';'),
|
||||||
|
'cd', '--', clonedir,
|
||||||
|
run.Raw('&&'),
|
||||||
|
'git', 'checkout', refspec,
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
remote.run(
|
remote.run(
|
||||||
logger=log.getChild(role),
|
logger=log.getChild(role),
|
||||||
|
Loading…
Reference in New Issue
Block a user