Fix loading of partial caching under a tag
This commit is contained in:
parent
b0e315c332
commit
9f1ec9d47d
1 changed files with 5 additions and 3 deletions
|
@ -92,16 +92,18 @@ class BuildJob(object):
|
|||
repo_name = repo_build.repository.name
|
||||
|
||||
current_image = model.get_image(repo_build.repository, base_image_id)
|
||||
next_image = None
|
||||
if current_image is None:
|
||||
return None
|
||||
|
||||
# For each cache comment, find a child image that matches the command.
|
||||
for cache_command in cache_commands:
|
||||
full_command = '["/bin/sh", "-c", "%s"]' % cache_command
|
||||
current_image = model.find_child_image(repo_build.repository, current_image, full_command)
|
||||
if current_image is None:
|
||||
return None
|
||||
next_image = model.find_child_image(repo_build.repository, current_image, full_command)
|
||||
if next_image is None:
|
||||
break
|
||||
|
||||
current_image = next_image
|
||||
logger.debug('Found cached image %s for comment %s', current_image.id, full_command)
|
||||
|
||||
# Find a tag associated with the image, if any.
|
||||
|
|
Reference in a new issue