Skip to content

Commit 7d06fbd

Browse files
author
Matthew Fisher
committed
fix(controller): more image parsing fixes
1 parent a9b13c9 commit 7d06fbd

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

controller/registry/private.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ def publish_release(source, config, target):
2323
contains the new configuration as ENV entries.
2424
"""
2525
try:
26-
if source.count(':') == 2:
26+
if source.count('/') == 2:
27+
# image comes from private registry
2728
src_image = source.rsplit(':', 1)[0].split('/', 1)[1]
2829
src_tag = source.split(':')[2]
30+
elif source.count('/') == 1 and source.count(':') == 1:
31+
# image comes from dockerhub, includes tag
32+
src_image = source.split(':')[0]
33+
src_tag = source.split(':')[1]
2934
else:
35+
# image comes from dockerhub, no tag
3036
src_image = source
3137
src_tag = 'latest'
3238
target_image = target.rsplit(':', 1)[0]

0 commit comments

Comments
 (0)