ci: publish templates to the control panel on main #1

Merged
greg merged 6 commits from feat/publish-to-panel into main 2026-10-25 05:13:27 +00:00
Owner

Adds gbrgames export and a CI step that posts every template to the control panel after validation on main (X-GBR-Event: games_published). A failed publish fails the run, so stale templates in the panel never go unnoticed.

Merge only after Gbreed/gbr-control-panel feat/games-git-sync is deployed. The current panel ignores this event with a 202, which curl treats as success.

Needs the org secret PANEL_WEBHOOK_SECRET, which node-agent CI already uses.

🤖 Generated with Claude Code

Adds `gbrgames export` and a CI step that posts every template to the control panel after validation on `main` (`X-GBR-Event: games_published`). A failed publish fails the run, so stale templates in the panel never go unnoticed. **Merge only after Gbreed/gbr-control-panel `feat/games-git-sync` is deployed.** The current panel ignores this event with a 202, which curl treats as success. Needs the org secret `PANEL_WEBHOOK_SECRET`, which node-agent CI already uses. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
greg added 1 commit 2026-10-24 21:13:15 +00:00
ci: publish templates to the control panel on main
Validate game templates / validate (push) Successful in 9m31s
5fb7736be2
Adds `gbrgames export`, which builds the games_published payload from
every game.yaml, and a CI step that posts it to the panel webhook after
validation on main. Unlike the node-agent notify, a failed publish fails
the run so stale templates in the panel never go unnoticed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
greg added 1 commit 2026-10-24 21:49:21 +00:00
ci: boot-test changed games before publishing
Validate game templates / validate (push) Successful in 9m32s
Validate game templates / publish (push) Canceled after 0s
Validate game templates / boot-test (push) Canceled after 5m15s
e9ff989246
Only games whose folder changed are boot-tested (against the previous
main commit, or against main on branches; manual runs pick games). Each
one is deployed by the node-agent's real deploy code on a dedicated
game-test runner, in a network that can reach the internet but not the
LAN. Publishing to the panel runs only if they all booted.

- boottest-payload builds the DEPLOY_SERVER message the panel would send
- readyPattern/failPatterns in game.yaml; readyExample in test.yaml is
  checked against the pattern during validation
- secrets in test.yaml come from CI; a game missing one is skipped
- Minecraft gets a ready pattern; Dragonwilds needs DRAGONWILDS_OWNER_ID
- RUNNER.md + scripts/runner: runner, isolated network, systemd unit

Also fixes newline values ("\n" separators/footers) that yaml.v3 wrote
as "" on import, which would have broken ARK and Dragonwilds config
files once synced, and adds a round-trip test for the importer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
greg added 1 commit 2026-10-25 00:36:27 +00:00
fix(minecraft): 3G heap so the server fits its 4 GB minimum
Validate game templates / validate (push) Successful in 9m33s
Validate game templates / boot-test (push) Failing after 11m34s
Validate game templates / publish (push) Skipped
e8edf853f7
With MEMORY=4G and requiredMemoryMb 4096, Java's heap plus overhead
exceeded the container limit and the server was killed on start; the
boot test failed every time. With 3G it is ready in about 18s at 4 GB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
greg added 1 commit 2026-10-25 01:33:31 +00:00
fix(boot-test): never overwrite non-password settings
Validate game templates / validate (push) Successful in 9m32s
Validate game templates / boot-test (push) Failing after 11m5s
Validate game templates / publish (push) Skipped
944b5fdd3e
The payload builder filled anything matching the validator's broad
credential pattern that wasn't a non-empty string, so RCON_PORT,
ENABLE_RCON and ARK's RCONEnabled/RCONPort became 'boot-123456' in the
first runner run. Only fill keys named like passwords (or x-generate),
and only when missing or an empty string. Adds a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
greg added 1 commit 2026-10-25 02:17:05 +00:00
fix(ark): run as the image's own user; honour custom RCON ports
Validate game templates / validate (push) Successful in 9m32s
Validate game templates / boot-test (push) Failing after 11m8s
Validate game templates / publish (push) Skipped
2ad445ffdd
ARK's image is built around user gameserver (uid 25000) and locks
/home/gameserver to it, so under the node's default 1000:1000 the
startup script got "Permission denied" and the server restart-looped,
on real nodes as well as in boot tests. Set containerUser 25000:25000
(needs node-agent and panel support for containerUser).

The startup command read ${RCON_PORT}, but the node passes the RCONPort
setting as RCONPORT, so custom RCON ports were ignored for 27020.

Boot-tested in the Linux agent image: up 30 minutes with no restart.
The test now waits 10 minutes, covering the first ~13 GB download.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
greg added 1 commit 2026-10-25 04:11:50 +00:00
ci: re-run push checks with the containerUser-capable agent
Validate game templates / validate (push) Successful in 9m32s
Validate game templates / boot-test (push) Successful in 25m47s
Validate game templates / publish (push) Skipped
b5b7712c87
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
greg merged commit 309c667735 into main 2026-10-25 05:13:27 +00:00
greg deleted branch feat/publish-to-panel 2026-10-25 05:13:27 +00:00
Member

Automated AI Review

Here's some quick feedback on your PR:

  • The workflow introduces a robust boot-testing mechanism with isolated Docker networks and proper secret handling, enhancing deployment reliability.
  • Changes include adding containerUser support for games requiring specific UID/GID, and updating validation logic to check regex patterns and readyExamples.
  • The addition of readyPattern and failPatterns fields in game schemas enables more precise server readiness and failure detection during boot tests.
>_Automated AI Review_ Here's some quick feedback on your PR: - The workflow introduces a robust boot-testing mechanism with isolated Docker networks and proper secret handling, enhancing deployment reliability. - Changes include adding `containerUser` support for games requiring specific UID/GID, and updating validation logic to check regex patterns and readyExamples. - The addition of `readyPattern` and `failPatterns` fields in game schemas enables more precise server readiness and failure detection during boot tests.
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gbreed-public/gbr-games#1