Skip to content

Commit 7576a02

Browse files
committed
fix(template): enforce init fail-fast and category metadata
1 parent 253a344 commit 7576a02

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ EXPOSE 3000
8585

8686
ENV SKYLIGHT_ENABLED=false
8787
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=300000
88+
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
8889

8990
HEALTHCHECK --interval=30s --timeout=10s --start-period=180s --retries=3 \
9091
CMD curl -fsS http://localhost:3000/up >/dev/null || exit 1

scripts/validate-template.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@
176176
"Full changelog and release notes:",
177177
)
178178
ALLOWED_CATEGORY_TOKENS = {
179-
"Productivity",
180-
"Tools-Utilities",
179+
"Productivity:",
180+
"Tools:Utilities",
181181
}
182182

183183

sure-aio.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
- Always publish on manual main workflow dispatch
4646
- Let manual publish proceed when smoke test is skipped
4747
- Trigger package publish for aio tag alignment</Changes>
48-
<Category>Productivity Tools-Utilities</Category>
48+
<Category>Productivity: Tools:Utilities</Category>
4949
<WebUI>http://[IP]:[PORT:3000]</WebUI>
5050
<TemplateURL>https://raw.githubusercontent.com/JSONbored/awesome-unraid/main/sure-aio.xml</TemplateURL>
5151
<Icon>https://raw.githubusercontent.com/JSONbored/awesome-unraid/main/icons/sure.png</Icon>

tests/template/test_container_contract.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def test_unraid_metadata_contract_is_complete_and_unprivileged() -> None:
7777
"Project",
7878
"TemplateURL",
7979
"Icon",
80+
"Category",
8081
"WebUI",
8182
):
8283
value = root.findtext(tag)
@@ -153,6 +154,7 @@ def test_dockerfile_has_runtime_safety_contract() -> None:
153154
assert "curl -fsS" in dockerfile # nosec B101
154155
assert 'ENTRYPOINT ["/init"]' in dockerfile # nosec B101
155156
assert "S6_CMD_WAIT_FOR_SERVICES_MAXTIME" in dockerfile # nosec B101
157+
assert "S6_BEHAVIOUR_IF_STAGE2_FAILS=2" in dockerfile # nosec B101
156158

157159

158160
def test_docker_socket_mount_is_advanced_and_documented_when_present() -> None:

0 commit comments

Comments
 (0)