Add upgrade strategy for collabora

This commit is contained in:
M. Rehan
2022-03-30 13:49:29 +05:00
parent f38b6901dd
commit 8e401126a6
3 changed files with 26 additions and 1 deletions

View File

@@ -17,5 +17,5 @@ spec:
- /bin/sh
- -ec
- |
curl --connect-timeout 5 --max-time 10 --retry 5 --retry-delay 15 --retry-max-time 90 --retry-all-errors -ks https://{{ $serviceName }}/loleaflet/dist/admin/admin.html
curl --connect-timeout 5 --max-time 10 --retry 5 --retry-delay 15 --retry-max-time 90 --retry-all-errors -ks https://{{ $serviceName }}/browser/dist/admin/admin.html
restartPolicy: Never

View File

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

24
test/collabora/upgrade_strategy Executable file
View File

@@ -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(sorted(image_tags[key], reverse=True))
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]))))