Remove Factorio direct deploy bootstrap
Validate, publish and promote Factorio chart / chart (push) Successful in 16s

This commit is contained in:
feedc0de committed 2026-10-27 07:36:00 +01:00
1 parent 9383c6fb58
commit a1f107e1fe
4 files changed
-193

No files matched your search

-19
View File
@@ -1,19 +0,0 @@
"""Roll the server when mounted configuration changes."""
import hashlib
import json
import sys
from pathlib import Path
import yaml
docs = list(yaml.safe_load_all(Path(sys.argv[1]).read_text()))
config = {d['metadata']['name']: d.get('data', {}) for d in docs if d['kind'] == 'ConfigMap' and d['metadata']['namespace'] == 'factorio'}
checksum = hashlib.sha256(json.dumps(config, sort_keys=True).encode()).hexdigest()
for doc in docs:
if doc['kind'] == 'Deployment' and doc['metadata']['name'] == 'factorio':
template = doc['spec']['template']
template['metadata'].setdefault('annotations', {})['factorio.brunner.ninja/config-revision'] = checksum
# The fresh PVC is an administrator bootstrap resource. CI never owns storage.
if doc['kind'] == 'PersistentVolumeClaim':
continue
print('---')
print(yaml.safe_dump(doc, sort_keys=False), end='')