def validate_artifact_version(options: dict) -> dict:
conflict_options_msg = """Conflicting options: --artifact-name and
--docker-image cannot be specified at the same time"""
if not options['docker_image']:
if not options['artifact_name']:
options['artifact_name'] = 'planb-cassandra-3.0'
image_version = get_latest_docker_image_version(options['artifact_name'])
docker_image = 'registry.opensource.zalan.do/stups/{}:{}' \
.format(options['artifact_name'], image_version)
info('Using docker image: {}'.format(docker_image))
else:
if options['artifact_name']:
raise click.UsageError(conflict_options_msg)
image_version = options['docker_image'].split(':')[-1]
docker_image = options['docker_image']
return dict(options, docker_image=docker_image, image_version=image_version)
评论列表
文章目录