Jelajahi Sumber

Update nextcloud catalog item in test train

sonicaj 4 tahun lalu
induk
melakukan
7e40aa20b5

+ 1 - 1
test/nextcloud/1.3.0/Chart.yaml

@@ -1,7 +1,7 @@
 apiVersion: v2
 name: nextcloud
 version: 1.3.0
-appVersion: 20.0.7
+appVersion: 21.0.2
 description: A file sharing server that puts the control and security of your own data back into your hands.
 keywords:
 - nextcloud

+ 1 - 1
test/nextcloud/1.3.0/ix_values.yaml

@@ -1,4 +1,4 @@
 image:
   repository: nextcloud
-  tag: 20.0.7
+  tag: 21.0.2
   pullPolicy: IfNotPresent

+ 1 - 1
test/nextcloud/1.3.0/test_values.yaml

@@ -3,7 +3,7 @@
 ##
 image:
   repository: nextcloud
-  tag: 19.0.3-apache
+  tag: 21.0.2
   pullPolicy: IfNotPresent
 
 nextcloud:

+ 1 - 0
test/nextcloud/upgrade_info.json

@@ -0,0 +1 @@
+{"filename":  "ix_values.yaml", "keys": ["image"]}

+ 24 - 0
test/nextcloud/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: version},
+        'app_version': version,
+    }
+
+
+if __name__ == '__main__':
+    if len(sys.argv) != 2:
+        exit(1)
+
+    print(json.dumps(newer_mapping(json.loads(sys.argv[1]))))