From 15afe4c9ecb3f4592eb23609c72f3c9dc6bd304e Mon Sep 17 00:00:00 2001 From: sonicaj Date: Sun, 4 Jul 2021 17:02:45 +0500 Subject: [PATCH] Update ipfs catalog item in test train --- test/ipfs/{1.1.0 => 1.1.1}/.helmignore | 0 test/ipfs/{1.1.0 => 1.1.1}/Chart.yaml | 18 ++++++------- test/ipfs/{1.1.0 => 1.1.1}/README.md | 0 test/ipfs/{1.1.0 => 1.1.1}/app-readme.md | 0 .../charts/common-2105.0.0.tgz | Bin .../ipfs/{1.1.0 => 1.1.1}/default_values.yaml | 0 test/ipfs/{1.1.0 => 1.1.1}/ix_values.yaml | 4 +-- test/ipfs/{1.1.0 => 1.1.1}/questions.yaml | 0 test/ipfs/{1.1.0 => 1.1.1}/requirements.lock | 0 .../ipfs/{1.1.0 => 1.1.1}/templates/NOTES.txt | 0 .../templates/deployment.yaml | 0 .../{1.1.0 => 1.1.1}/templates/service.yaml | 0 .../templates/serviceaccount.yaml | 0 test/ipfs/{1.1.0 => 1.1.1}/test_values.yaml | 2 +- test/ipfs/{1.1.0 => 1.1.1}/values.yaml | 0 test/ipfs/upgrade_info.json | 1 + test/ipfs/upgrade_strategy | 24 ++++++++++++++++++ 17 files changed, 37 insertions(+), 12 deletions(-) rename test/ipfs/{1.1.0 => 1.1.1}/.helmignore (100%) rename test/ipfs/{1.1.0 => 1.1.1}/Chart.yaml (72%) rename test/ipfs/{1.1.0 => 1.1.1}/README.md (100%) rename test/ipfs/{1.1.0 => 1.1.1}/app-readme.md (100%) rename test/ipfs/{1.1.0 => 1.1.1}/charts/common-2105.0.0.tgz (100%) rename test/ipfs/{1.1.0 => 1.1.1}/default_values.yaml (100%) rename test/ipfs/{1.1.0 => 1.1.1}/ix_values.yaml (81%) rename test/ipfs/{1.1.0 => 1.1.1}/questions.yaml (100%) rename test/ipfs/{1.1.0 => 1.1.1}/requirements.lock (100%) rename test/ipfs/{1.1.0 => 1.1.1}/templates/NOTES.txt (100%) rename test/ipfs/{1.1.0 => 1.1.1}/templates/deployment.yaml (100%) rename test/ipfs/{1.1.0 => 1.1.1}/templates/service.yaml (100%) rename test/ipfs/{1.1.0 => 1.1.1}/templates/serviceaccount.yaml (100%) rename test/ipfs/{1.1.0 => 1.1.1}/test_values.yaml (97%) rename test/ipfs/{1.1.0 => 1.1.1}/values.yaml (100%) create mode 100644 test/ipfs/upgrade_info.json create mode 100755 test/ipfs/upgrade_strategy diff --git a/test/ipfs/1.1.0/.helmignore b/test/ipfs/1.1.1/.helmignore similarity index 100% rename from test/ipfs/1.1.0/.helmignore rename to test/ipfs/1.1.1/.helmignore diff --git a/test/ipfs/1.1.0/Chart.yaml b/test/ipfs/1.1.1/Chart.yaml similarity index 72% rename from test/ipfs/1.1.0/Chart.yaml rename to test/ipfs/1.1.1/Chart.yaml index e0336e6aed..d1565b9e5b 100644 --- a/test/ipfs/1.1.0/Chart.yaml +++ b/test/ipfs/1.1.1/Chart.yaml @@ -1,18 +1,18 @@ apiVersion: v1 +appVersion: v0.9.0 +dependencies: +- name: common + repository: file://../../../library/common/2105.0.0 + version: 2105.0.0 description: Global, Versioned, peer-to-peer filesystem. -name: ipfs -version: 1.1.0 -appVersion: v0.8.0 +home: https://ipfs.io +icon: https://ipfs.io/ipfs/QmVk7srrwahXLNmcDYvyUEJptyoxpndnRa57YJ11L4jV26/ipfs.go.png keywords: - storage - p2p -home: https://ipfs.io -icon: https://ipfs.io/ipfs/QmVk7srrwahXLNmcDYvyUEJptyoxpndnRa57YJ11L4jV26/ipfs.go.png +name: ipfs sources: - https://github.com/ipfs/go-ipfs - https://hub.docker.com/r/ipfs/go-ipfs upstream_version: 0.8.0-rc1 -dependencies: - - name: common - repository: file://../../../library/common/2105.0.0 - version: 2105.0.0 +version: 1.1.1 diff --git a/test/ipfs/1.1.0/README.md b/test/ipfs/1.1.1/README.md similarity index 100% rename from test/ipfs/1.1.0/README.md rename to test/ipfs/1.1.1/README.md diff --git a/test/ipfs/1.1.0/app-readme.md b/test/ipfs/1.1.1/app-readme.md similarity index 100% rename from test/ipfs/1.1.0/app-readme.md rename to test/ipfs/1.1.1/app-readme.md diff --git a/test/ipfs/1.1.0/charts/common-2105.0.0.tgz b/test/ipfs/1.1.1/charts/common-2105.0.0.tgz similarity index 100% rename from test/ipfs/1.1.0/charts/common-2105.0.0.tgz rename to test/ipfs/1.1.1/charts/common-2105.0.0.tgz diff --git a/test/ipfs/1.1.0/default_values.yaml b/test/ipfs/1.1.1/default_values.yaml similarity index 100% rename from test/ipfs/1.1.0/default_values.yaml rename to test/ipfs/1.1.1/default_values.yaml diff --git a/test/ipfs/1.1.0/ix_values.yaml b/test/ipfs/1.1.1/ix_values.yaml similarity index 81% rename from test/ipfs/1.1.0/ix_values.yaml rename to test/ipfs/1.1.1/ix_values.yaml index a41f18a171..b88dfe6cc1 100644 --- a/test/ipfs/1.1.0/ix_values.yaml +++ b/test/ipfs/1.1.1/ix_values.yaml @@ -1,4 +1,4 @@ image: - repository: ipfs/go-ipfs - tag: v0.8.0 pullPolicy: IfNotPresent + repository: ipfs/go-ipfs + tag: v0.9.0 diff --git a/test/ipfs/1.1.0/questions.yaml b/test/ipfs/1.1.1/questions.yaml similarity index 100% rename from test/ipfs/1.1.0/questions.yaml rename to test/ipfs/1.1.1/questions.yaml diff --git a/test/ipfs/1.1.0/requirements.lock b/test/ipfs/1.1.1/requirements.lock similarity index 100% rename from test/ipfs/1.1.0/requirements.lock rename to test/ipfs/1.1.1/requirements.lock diff --git a/test/ipfs/1.1.0/templates/NOTES.txt b/test/ipfs/1.1.1/templates/NOTES.txt similarity index 100% rename from test/ipfs/1.1.0/templates/NOTES.txt rename to test/ipfs/1.1.1/templates/NOTES.txt diff --git a/test/ipfs/1.1.0/templates/deployment.yaml b/test/ipfs/1.1.1/templates/deployment.yaml similarity index 100% rename from test/ipfs/1.1.0/templates/deployment.yaml rename to test/ipfs/1.1.1/templates/deployment.yaml diff --git a/test/ipfs/1.1.0/templates/service.yaml b/test/ipfs/1.1.1/templates/service.yaml similarity index 100% rename from test/ipfs/1.1.0/templates/service.yaml rename to test/ipfs/1.1.1/templates/service.yaml diff --git a/test/ipfs/1.1.0/templates/serviceaccount.yaml b/test/ipfs/1.1.1/templates/serviceaccount.yaml similarity index 100% rename from test/ipfs/1.1.0/templates/serviceaccount.yaml rename to test/ipfs/1.1.1/templates/serviceaccount.yaml diff --git a/test/ipfs/1.1.0/test_values.yaml b/test/ipfs/1.1.1/test_values.yaml similarity index 97% rename from test/ipfs/1.1.0/test_values.yaml rename to test/ipfs/1.1.1/test_values.yaml index 9b6d8652f3..2f385ceddf 100644 --- a/test/ipfs/1.1.0/test_values.yaml +++ b/test/ipfs/1.1.1/test_values.yaml @@ -2,7 +2,7 @@ ## image: repository: ipfs/go-ipfs - tag: v0.8.0 + tag: v0.9.0 pullPolicy: IfNotPresent ## Additional arguments to pass to minio binary diff --git a/test/ipfs/1.1.0/values.yaml b/test/ipfs/1.1.1/values.yaml similarity index 100% rename from test/ipfs/1.1.0/values.yaml rename to test/ipfs/1.1.1/values.yaml diff --git a/test/ipfs/upgrade_info.json b/test/ipfs/upgrade_info.json new file mode 100644 index 0000000000..5bf84fb901 --- /dev/null +++ b/test/ipfs/upgrade_info.json @@ -0,0 +1 @@ +{"filename": "ix_values.yaml", "keys": ["image"]} diff --git a/test/ipfs/upgrade_strategy b/test/ipfs/upgrade_strategy new file mode 100755 index 0000000000..3682360b3d --- /dev/null +++ b/test/ipfs/upgrade_strategy @@ -0,0 +1,24 @@ +#!/usr/bin/python3 +import json +import sys + +from catalog_update.upgrade_strategy import semantic_versioning + + +def newer_mapping(image_tags): + key = list(image_tags.keys())[0] + version = semantic_versioning(image_tags[key]) + if not version: + return {} + + return { + 'tags': {key: f'v{version}'}, + 'app_version': f'v{version}', + } + + +if __name__ == '__main__': + if len(sys.argv) != 2: + exit(1) + + print(json.dumps(newer_mapping(json.loads(sys.argv[1]))))