Only gather image names and fix generator

This commit is contained in:
decentral1se 2021-04-02 16:54:40 +02:00
parent 26f9e1747f
commit 8a54fa3f27
Signed by untrusted user who does not match committer: decentral1se
GPG Key ID: 92DAD76BD9567B8A
2 changed files with 9 additions and 4 deletions

View File

@ -118,7 +118,11 @@ def get_app_versions(app_path, tag):
digest_command = f"skopeo inspect docker://{image} | jq '.Digest'" digest_command = f"skopeo inspect docker://{image} | jq '.Digest'"
output = check_output(digest_command, shell=True).decode("utf-8") output = check_output(digest_command, shell=True).decode("utf-8")
digest = output.strip().split(":")[-1][:8] digest = output.strip().split(":")[-1][:8]
versions.append({service: {"image": image, "tag": tag, "digest": digest}})
image_name = image.split(":")[0]
versions.append(
{service: {"image": image_name, "tag": tag, "digest": digest}}
)
run(f"git checkout HEAD", shell=True) run(f"git checkout HEAD", shell=True)
return versions return versions
@ -126,7 +130,8 @@ def get_app_versions(app_path, tag):
clone_apps() clone_apps()
target = f"{SCRIPT_PATH}/../deploy/abra-apps.autonomic.zone/abra-apps.json" target = f"{SCRIPT_PATH}/../deploy/abra-apps.cloud.autonomic.zone/abra-apps.json"
with open(target, "w", encoding="utf-8") as handle: with open(target, "w", encoding="utf-8") as handle:
dump(gen_apps_json(), handle, ensure_ascii=False, indent=4) dump(gen_apps_json(), handle, ensure_ascii=False, indent=4)

View File

@ -19,14 +19,14 @@
"versions": [ "versions": [
{ {
"app": { "app": {
"image": "gitea/gitea:1.13.6", "image": "gitea/gitea",
"tag": "1.13.6", "tag": "1.13.6",
"digest": "1d90f984" "digest": "1d90f984"
} }
}, },
{ {
"db": { "db": {
"image": "mariadb:10.5", "image": "mariadb",
"tag": "1.13.6", "tag": "1.13.6",
"digest": "ab7c906b" "digest": "ab7c906b"
} }