Stavros kois 1 рік тому
батько
коміт
10b760f25c

+ 6 - 0
library/ix-dev/community/vikunja/Chart.lock

@@ -0,0 +1,6 @@
+dependencies:
+- name: common
+  repository: file://../../../common
+  version: 1.2.3
+digest: sha256:e6ff49b06bf5d4d159e505ae6d153f36cd46170bb519caf90462cd5caebfd0fb
+generated: "2023-11-09T16:20:50.070989809+02:00"

+ 24 - 0
library/ix-dev/community/vikunja/Chart.yaml

@@ -0,0 +1,24 @@
+name: vikunja
+description: Vikunja is an open-source, self-hostable to-do app.
+annotations:
+  title: Vikunja
+type: application
+version: 1.0.0
+apiVersion: v2
+appVersion: latest
+kubeVersion: '>=1.16.0-0'
+maintainers:
+  - name: truenas
+    url: https://www.truenas.com/
+    email: dev@ixsystems.com
+dependencies:
+  - name: common
+    repository: file://../../../common
+    version: 1.2.3
+home: https://vikunja.io/
+icon: https://media.sys.truenas.net/apps/vikunja/icons/icon.png
+sources:
+  - https://github.com/truenas/charts/tree/master/library/ix-dev/community/vikunja
+  - https://vikunja.io/
+keywords:
+  - todo

BIN
library/ix-dev/community/vikunja/charts/common-1.2.3.tgz


+ 15 - 0
library/ix-dev/community/vikunja/item.yaml

@@ -0,0 +1,15 @@
+icon_url: https://media.sys.truenas.net/apps/vikunja/icons/icon.png
+categories:
+  - productivity
+screenshots:
+  - https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot1.webp
+  - https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot2.webp
+  - https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot3.webp
+  - https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot4.webp
+  - https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot5.webp
+  - https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot6.webp
+  - https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot7.webp
+  - https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot8.webp
+  - https://media.sys.truenas.net/apps/vikunja/screenshots/screenshot9.webp
+tags:
+  - todo

+ 1 - 0
library/ix-dev/community/vikunja/templates/NOTES.txt

@@ -0,0 +1 @@
+{{ include "ix.v1.common.lib.chart.notes" $ }}

+ 1 - 0
library/ix-dev/community/vikunja/upgrade_info.json

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

+ 52 - 0
library/ix-dev/community/vikunja/upgrade_strategy

@@ -0,0 +1,52 @@
+#!/usr/bin/python3
+import json
+import re
+import sys
+
+from catalog_update.upgrade_strategy import semantic_versioning
+
+
+RE_STABLE_VERSION = re.compile(r'\d+\.\d+\.\d+')
+ENUMS = {
+    'image': {
+        'RE_STABLE_VERSION': RE_STABLE_VERSION,
+    },
+    'apiImage': {
+        'RE_STABLE_VERSION': RE_STABLE_VERSION,
+    },
+}
+
+
+def newer_mapping(image_tags):
+    output = {
+        "tags": {},
+        "app_version": ""
+    }
+
+
+    for key in image_tags.keys():
+        RE_STABLE_VERSION = ENUMS[key].get('RE_STABLE_VERSION', None) if key in ENUMS else None
+        if (RE_STABLE_VERSION is None):
+            continue
+
+        tags = {t: t for t in image_tags[key] if RE_STABLE_VERSION.fullmatch(t)}
+        version = semantic_versioning(list(tags))
+
+        if not version:
+            continue
+
+        if key == 'image':
+            output['app_version'] = version
+
+        output['tags'][key] = tags[version]
+
+    return output
+
+
+if __name__ == '__main__':
+    try:
+        versions_json = json.loads(sys.stdin.read())
+    except ValueError:
+        raise ValueError('Invalid json specified')
+
+    print(json.dumps(newer_mapping(versions_json)))