unrip/scripts/deploy/render_release_manifest.py
philipp deda0002ab
All checks were successful
deploy / deploy (push) Successful in 30s
Wire push deployment for all services
Proof: Push-driven repo workflow now renders and applies the built image across all repo-owned deployments instead of resetting services to placeholder images or relying on a manual rollout list.

Assumptions: All repo-owned workloads that should roll on push carry app.kubernetes.io/part-of= in the manifests, and namespace bootstrap can happen before the image build without applying placeholder deployments.

Still fake: This turn fixes the repo deployment path in code, but I have not yet exercised the new Forgejo workflow end-to-end from a fresh push on the cluster.
2026-04-08 21:47:51 +02:00

28 lines
711 B
Python

#!/usr/bin/env python3
from __future__ import annotations
import argparse
import sys
PLACEHOLDER_IMAGE = "ghcr.io/example/unrip:bootstrap"
def render_release_manifest(manifest: str, image: str) -> str:
return manifest.replace(PLACEHOLDER_IMAGE, image)
def main() -> int:
parser = argparse.ArgumentParser(
description="Render a release manifest by replacing placeholder app images."
)
parser.add_argument("--image", required=True, help="Fully qualified image reference to deploy.")
args = parser.parse_args()
source = sys.stdin.read()
sys.stdout.write(render_release_manifest(source, args.image))
return 0
if __name__ == "__main__":
raise SystemExit(main())