fix missing parameter
parent
cef99ba62a
commit
6382a71f34
|
|
@ -5,14 +5,14 @@ import docker_compose
|
||||||
import image_tags
|
import image_tags
|
||||||
|
|
||||||
|
|
||||||
def find_updates(image_ref):
|
def find_updates(image_ref, usages):
|
||||||
try:
|
try:
|
||||||
newer_tags = image_tags.get_new_tags(image_ref)
|
newer_tags = image_tags.get_new_tags(image_ref)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
newer_tags = e.args
|
newer_tags = e.args
|
||||||
return {
|
return {
|
||||||
"updates": newer_tags,
|
"updates": newer_tags,
|
||||||
"usages": images[image][tag],
|
"usages": usages,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -25,15 +25,20 @@ def main(args):
|
||||||
image_ref = f"{image}:{tag}"
|
image_ref = f"{image}:{tag}"
|
||||||
if image_ref in updates:
|
if image_ref in updates:
|
||||||
continue
|
continue
|
||||||
updates[image_ref] = find_updates(image_ref)
|
updates[image_ref] = find_updates(image_ref, images[image][tag])
|
||||||
for usage in images[image][tag:
|
for usage in images[image][tag]:
|
||||||
if "base_image" in usage:
|
if "base_image" in usage:
|
||||||
continue
|
continue
|
||||||
for base in usage["base_image"]:
|
for base in usage["base_image"]:
|
||||||
if base in updates:
|
if base in updates:
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
updates[base] = find_updates(base)
|
info = {
|
||||||
|
"base_image": True,
|
||||||
|
"path:" images[image][tag]["path"],
|
||||||
|
"service_name": images[image][tag]["service_name"]
|
||||||
|
}
|
||||||
|
updates[base] = find_updates(base, info)
|
||||||
|
|
||||||
|
|
||||||
if args.output:
|
if args.output:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue