Verify image healthcheck before publishing from Gitea
Build and Publish TVJ EPG Image / build (push) Failing after 27s
Build and Publish TVJ EPG Image / build (push) Failing after 27s
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
"""Fail publication if the built image lost its automatic healthcheck."""
|
||||
import json
|
||||
import sys
|
||||
|
||||
images = json.load(sys.stdin)
|
||||
healthcheck = images[0].get("Config", {}).get("Healthcheck") or {}
|
||||
expected = ["CMD", "python", "-m", "epg.healthcheck"]
|
||||
if healthcheck.get("Test") != expected:
|
||||
sys.exit("Image healthcheck missing or incorrect; refusing publication")
|
||||
print("Image healthcheck verified")
|
||||
Reference in New Issue
Block a user