From 54337743e6cb3a90c8408e36a653b1a44b7fcb03 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Sun, 4 Jul 2021 17:58:36 +0500 Subject: [PATCH] Update plex catalog item in test train --- test/plex/1.6.1/Chart.yaml | 18 ------------- test/plex/{1.6.1 => 1.6.2}/.helmignore | 0 test/plex/{1.6.1 => 1.6.2}/Chart.lock | 0 test/plex/1.6.2/Chart.yaml | 17 ++++++++++++ test/plex/{1.6.1 => 1.6.2}/README.md | 0 test/plex/{1.6.1 => 1.6.2}/app-readme.md | 0 .../charts/common-2105.0.0.tgz | Bin .../plex/{1.6.1 => 1.6.2}/default_values.yaml | 0 test/plex/{1.6.1 => 1.6.2}/ix_values.yaml | 4 +-- .../migrations/migrate_from_1.0.0 | 0 test/plex/{1.6.1 => 1.6.2}/questions.yaml | 0 .../plex/{1.6.1 => 1.6.2}/templates/NOTES.txt | 0 .../templates/deployment.yaml | 0 .../templates/probe_config.yaml | 0 .../templates/service-tcp.yaml | 0 .../templates/service-udp.yaml | 0 test/plex/{1.6.1 => 1.6.2}/test_values.yaml | 2 +- test/plex/{1.6.1 => 1.6.2}/values.yaml | 0 test/plex/upgrade_info.json | 1 + test/plex/upgrade_strategy | 25 ++++++++++++++++++ 20 files changed, 46 insertions(+), 21 deletions(-) delete mode 100644 test/plex/1.6.1/Chart.yaml rename test/plex/{1.6.1 => 1.6.2}/.helmignore (100%) rename test/plex/{1.6.1 => 1.6.2}/Chart.lock (100%) create mode 100644 test/plex/1.6.2/Chart.yaml rename test/plex/{1.6.1 => 1.6.2}/README.md (100%) rename test/plex/{1.6.1 => 1.6.2}/app-readme.md (100%) rename test/plex/{1.6.1 => 1.6.2}/charts/common-2105.0.0.tgz (100%) rename test/plex/{1.6.1 => 1.6.2}/default_values.yaml (100%) rename test/plex/{1.6.1 => 1.6.2}/ix_values.yaml (69%) rename test/plex/{1.6.1 => 1.6.2}/migrations/migrate_from_1.0.0 (100%) rename test/plex/{1.6.1 => 1.6.2}/questions.yaml (100%) rename test/plex/{1.6.1 => 1.6.2}/templates/NOTES.txt (100%) rename test/plex/{1.6.1 => 1.6.2}/templates/deployment.yaml (100%) rename test/plex/{1.6.1 => 1.6.2}/templates/probe_config.yaml (100%) rename test/plex/{1.6.1 => 1.6.2}/templates/service-tcp.yaml (100%) rename test/plex/{1.6.1 => 1.6.2}/templates/service-udp.yaml (100%) rename test/plex/{1.6.1 => 1.6.2}/test_values.yaml (98%) rename test/plex/{1.6.1 => 1.6.2}/values.yaml (100%) create mode 100644 test/plex/upgrade_info.json create mode 100755 test/plex/upgrade_strategy diff --git a/test/plex/1.6.1/Chart.yaml b/test/plex/1.6.1/Chart.yaml deleted file mode 100644 index f027411a1b..0000000000 --- a/test/plex/1.6.1/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v2 -appVersion: 1.21.3.4046-3c1c83ba4 -description: Plex Media Server -name: plex -version: 1.6.1 -keywords: - - plex -home: https://plex.tv/ -icon: https://www.plex.tv/wp-content/uploads/2018/01/pmp-icon-1.png -sources: - - https://hub.docker.com/r/plexinc/pms-docker/ - - https://github.com/k8s-at-home/charts/tree/master/charts/plex -upstream_version: 2.1.0 -dependencies: - - name: common - repository: file://../../../library/common/2105.0.0 - version: 2105.0.0 - diff --git a/test/plex/1.6.1/.helmignore b/test/plex/1.6.2/.helmignore similarity index 100% rename from test/plex/1.6.1/.helmignore rename to test/plex/1.6.2/.helmignore diff --git a/test/plex/1.6.1/Chart.lock b/test/plex/1.6.2/Chart.lock similarity index 100% rename from test/plex/1.6.1/Chart.lock rename to test/plex/1.6.2/Chart.lock diff --git a/test/plex/1.6.2/Chart.yaml b/test/plex/1.6.2/Chart.yaml new file mode 100644 index 0000000000..6f8de16462 --- /dev/null +++ b/test/plex/1.6.2/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v2 +appVersion: 1.23.3.4707 +dependencies: +- name: common + repository: file://../../../library/common/2105.0.0 + version: 2105.0.0 +description: Plex Media Server +home: https://plex.tv/ +icon: https://www.plex.tv/wp-content/uploads/2018/01/pmp-icon-1.png +keywords: +- plex +name: plex +sources: +- https://hub.docker.com/r/plexinc/pms-docker/ +- https://github.com/k8s-at-home/charts/tree/master/charts/plex +upstream_version: 2.1.0 +version: 1.6.2 diff --git a/test/plex/1.6.1/README.md b/test/plex/1.6.2/README.md similarity index 100% rename from test/plex/1.6.1/README.md rename to test/plex/1.6.2/README.md diff --git a/test/plex/1.6.1/app-readme.md b/test/plex/1.6.2/app-readme.md similarity index 100% rename from test/plex/1.6.1/app-readme.md rename to test/plex/1.6.2/app-readme.md diff --git a/test/plex/1.6.1/charts/common-2105.0.0.tgz b/test/plex/1.6.2/charts/common-2105.0.0.tgz similarity index 100% rename from test/plex/1.6.1/charts/common-2105.0.0.tgz rename to test/plex/1.6.2/charts/common-2105.0.0.tgz diff --git a/test/plex/1.6.1/default_values.yaml b/test/plex/1.6.2/default_values.yaml similarity index 100% rename from test/plex/1.6.1/default_values.yaml rename to test/plex/1.6.2/default_values.yaml diff --git a/test/plex/1.6.1/ix_values.yaml b/test/plex/1.6.2/ix_values.yaml similarity index 69% rename from test/plex/1.6.1/ix_values.yaml rename to test/plex/1.6.2/ix_values.yaml index aa00419111..23808f2713 100644 --- a/test/plex/1.6.1/ix_values.yaml +++ b/test/plex/1.6.2/ix_values.yaml @@ -1,4 +1,4 @@ image: - repository: plexinc/pms-docker - tag: 1.21.3.4046-3c1c83ba4 pullPolicy: IfNotPresent + repository: plexinc/pms-docker + tag: 1.23.3.4707-ebb5fe9f3 diff --git a/test/plex/1.6.1/migrations/migrate_from_1.0.0 b/test/plex/1.6.2/migrations/migrate_from_1.0.0 similarity index 100% rename from test/plex/1.6.1/migrations/migrate_from_1.0.0 rename to test/plex/1.6.2/migrations/migrate_from_1.0.0 diff --git a/test/plex/1.6.1/questions.yaml b/test/plex/1.6.2/questions.yaml similarity index 100% rename from test/plex/1.6.1/questions.yaml rename to test/plex/1.6.2/questions.yaml diff --git a/test/plex/1.6.1/templates/NOTES.txt b/test/plex/1.6.2/templates/NOTES.txt similarity index 100% rename from test/plex/1.6.1/templates/NOTES.txt rename to test/plex/1.6.2/templates/NOTES.txt diff --git a/test/plex/1.6.1/templates/deployment.yaml b/test/plex/1.6.2/templates/deployment.yaml similarity index 100% rename from test/plex/1.6.1/templates/deployment.yaml rename to test/plex/1.6.2/templates/deployment.yaml diff --git a/test/plex/1.6.1/templates/probe_config.yaml b/test/plex/1.6.2/templates/probe_config.yaml similarity index 100% rename from test/plex/1.6.1/templates/probe_config.yaml rename to test/plex/1.6.2/templates/probe_config.yaml diff --git a/test/plex/1.6.1/templates/service-tcp.yaml b/test/plex/1.6.2/templates/service-tcp.yaml similarity index 100% rename from test/plex/1.6.1/templates/service-tcp.yaml rename to test/plex/1.6.2/templates/service-tcp.yaml diff --git a/test/plex/1.6.1/templates/service-udp.yaml b/test/plex/1.6.2/templates/service-udp.yaml similarity index 100% rename from test/plex/1.6.1/templates/service-udp.yaml rename to test/plex/1.6.2/templates/service-udp.yaml diff --git a/test/plex/1.6.1/test_values.yaml b/test/plex/1.6.2/test_values.yaml similarity index 98% rename from test/plex/1.6.1/test_values.yaml rename to test/plex/1.6.2/test_values.yaml index 193c0fe331..f053fa52da 100644 --- a/test/plex/1.6.1/test_values.yaml +++ b/test/plex/1.6.2/test_values.yaml @@ -6,7 +6,7 @@ image: repository: plexinc/pms-docker - tag: 1.20.2.3402-0fec14d92 + tag: 1.23.3.4707-ebb5fe9f3 pullPolicy: IfNotPresent ##### START --> Official PLEX container environment variables diff --git a/test/plex/1.6.1/values.yaml b/test/plex/1.6.2/values.yaml similarity index 100% rename from test/plex/1.6.1/values.yaml rename to test/plex/1.6.2/values.yaml diff --git a/test/plex/upgrade_info.json b/test/plex/upgrade_info.json new file mode 100644 index 0000000000..5bf84fb901 --- /dev/null +++ b/test/plex/upgrade_info.json @@ -0,0 +1 @@ +{"filename": "ix_values.yaml", "keys": ["image"]} diff --git a/test/plex/upgrade_strategy b/test/plex/upgrade_strategy new file mode 100755 index 0000000000..a8940ad684 --- /dev/null +++ b/test/plex/upgrade_strategy @@ -0,0 +1,25 @@ +#!/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] + tags = {t.rsplit('-', 1)[0]: t for t in image_tags[key]} + version = semantic_versioning(list(tags)) + if not version: + return {} + + return { + 'tags': {key: tags[version]}, + 'app_version': version, + } + + +if __name__ == '__main__': + if len(sys.argv) != 2: + exit(1) + + print(json.dumps(newer_mapping(json.loads(sys.argv[1]))))