Add Gitea build, container tests and registry publication
All checks were successful
Build, test and publish / verify (push) Successful in 1m41s

This commit is contained in:
2026-10-28 17:07:23 +01:00
parent e3e362c2ac
commit 74a5aa1237
26 changed files with 1180 additions and 12 deletions

View File

@@ -0,0 +1,32 @@
#!/usr/bin/env python3
"""Merge this project's HTTP registry into a selected daemon JSON file."""
import json
from pathlib import Path
import shutil
import sys
if len(sys.argv) != 2:
sys.exit('Usage: python3 ci/runner/configure-docker.py <daemon.json>')
path = Path(sys.argv[1]).expanduser()
data = json.loads(path.read_text()) if path.exists() else {}
registries = data.setdefault('insecure-registries', [])
if not isinstance(registries, list):
sys.exit('Existing insecure-registries must be an array; configuration left unchanged')
if '192.168.2.28:3000' in registries:
print('Internal registry already configured; no change')
sys.exit(0)
registries.append('192.168.2.28:3000')
path.parent.mkdir(parents=True, exist_ok=True)
if path.exists():
backup = path.with_name(path.name + '.before-agiledancers')
if not backup.exists():
shutil.copy2(path, backup)
# Write in the same directory, then replace atomically.
temporary = path.with_name(path.name + '.agiledancers.tmp')
with temporary.open('x') as output:
json.dump(data, output, indent=2)
output.write('\n')
if path.exists():
shutil.copymode(path, temporary)
temporary.replace(path)
print('Internal registry added; restart/apply Docker Engine configuration to activate')