"section.")
sha1 = config.get('sha1')
flavor = config.get('flavor', 'default')
+ distro_suffix = config.get('distro-suffix', None)
if any(_ in container_image_name for _ in (':', '@')):
log.info('Provided image contains tag or digest, using it as is')
ctx.ceph[cluster_name].image = container_image_name
- elif sha1:
- if flavor == "crimson-debug" or flavor == "crimson-release":
- ctx.ceph[cluster_name].image = container_image_name + ':' + sha1 + '-' + flavor
- else:
- ctx.ceph[cluster_name].image = container_image_name + ':' + sha1
- ref = sha1
else:
- # fall back to using the branch value
+ if sha1:
+ ref = sha1
ctx.ceph[cluster_name].image = container_image_name + ':' + ref
+
+ if distro_suffix is not None:
+ ctx.ceph[cluster_name].image += '-' + distro_suffix
+ if flavor == "crimson-debug" or flavor == "crimson-release":
+ ctx.ceph[cluster_name].image += '-' + flavor
log.info('Cluster image is %s' % ctx.ceph[cluster_name].image)