From ad6bd514c84d3eca0e3fba96fe8e0b8fb21e8bc6 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 15 Nov 2019 14:21:02 +0000 Subject: [PATCH] qa/tasks/ceph2: pull image using sha1 Signed-off-by: Sage Weil --- qa/tasks/ceph2.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/qa/tasks/ceph2.py b/qa/tasks/ceph2.py index a4e9791fbb4..20c949ac1b3 100644 --- a/qa/tasks/ceph2.py +++ b/qa/tasks/ceph2.py @@ -758,12 +758,19 @@ def task(ctx, config): #validate_config(ctx, config) # image - branch = config.get('branch', 'master') - ### FIXME ### - if branch in ['master', 'nautilus']: - ctx.image = 'ceph/daemon-base:latest-%s-devel' % branch - else: - ctx.image = 'quay.io/ceph-ci/ceph:%s' % branch + ctx.image = config.get('image') + if not ctx.image: + sha1 = config.get('sha1') + if sha1: + ctx.image = 'quay.io/ceph-ci/ceph:%s' % sha1 + else: + # hmm, fall back to branch? + branch = config.get('branch', 'master') + # FIXME when ceph-ci builds all branches + if branch in ['master', 'nautilus']: + ctx.image = 'ceph/daemon-base:latest-%s-devel' % branch + else: + ctx.image = 'quay.io/ceph-ci/ceph:%s' % branch log.info('Cluster image is %s' % ctx.image) # uuid -- 2.39.5