From c0bffc1be3eb6fc54f2733c16565a5b0ccd05607 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Tue, 13 Jul 2021 17:07:06 +0500 Subject: [PATCH] Update chia versioning update strategy This commit adds changes to update how we determine if we have an updated tag available for chia - recently we have shifted the versioning scheme on our docker image of chia and this change is to account for that so we can have automated updates. --- charts/chia/upgrade_strategy | 5 +++-- test/chia/upgrade_strategy | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/charts/chia/upgrade_strategy b/charts/chia/upgrade_strategy index adafa41868..6b95867d8d 100755 --- a/charts/chia/upgrade_strategy +++ b/charts/chia/upgrade_strategy @@ -7,13 +7,14 @@ from catalog_update.upgrade_strategy import semantic_versioning def newer_mapping(image_tags): key = list(image_tags.keys())[0] + tags = {t.strip('v').replace('_', '.'): t for t in image_tags[key]} version = semantic_versioning(image_tags[key]) if not version: return {} return { - 'tags': {key: version}, - 'app_version': version, + 'tags': {key: tags[version]}, + 'app_version': tags[version], } diff --git a/test/chia/upgrade_strategy b/test/chia/upgrade_strategy index adafa41868..6b95867d8d 100755 --- a/test/chia/upgrade_strategy +++ b/test/chia/upgrade_strategy @@ -7,13 +7,14 @@ from catalog_update.upgrade_strategy import semantic_versioning def newer_mapping(image_tags): key = list(image_tags.keys())[0] + tags = {t.strip('v').replace('_', '.'): t for t in image_tags[key]} version = semantic_versioning(image_tags[key]) if not version: return {} return { - 'tags': {key: version}, - 'app_version': version, + 'tags': {key: tags[version]}, + 'app_version': tags[version], }