Skip to content

feat(packs): configure-and-deploy from registry (variables form + deploy-pack landing) - #17

Merged
pipozzz merged 4 commits into
mainfrom
feat/pack-configure-form
Sep 30, 2026
Merged

pipozzz merged 4 commits into
mainfrom
feat/pack-configure-form

Conversation

@pipozzz

@pipozzz pipozzz commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

The panel side of the "registry as an app store" axis. Two parts:

1. Configure-before-deploy (variables form) — add-pack.tsx
The Nomad Pack gallery deployed with defaults only. Now picking a pack opens a configure step that fetches the registry's per-pack JSON (api.nomad.getNomadPack) and renders a form from the pack's variable schema — scalar vars only; plumbing vars (job_name/namespace/datacenters/constraints) hidden; sensitive masked; placeholder ("change-me") vars required; quick facts (tasks/ports/bundled DB) shown. Chosen values are serialized to the pack var-file (composeFile, HCL) so the existing getBuildNomadPackCommand runs nomad-pack run --var-file. Packs with no schema fall back to "create with defaults".

2. Deep-link landing page — pages/dashboard/deploy-pack.tsx
Target of a "Deploy to Nomploy" link from a registry (packs.nomploy.com carries ?pack=<id>&registry=<url>). The logged-in user picks a project + environment (auto-selected when there's only one), then the configure dialog opens pre-filled; on success it jumps to the environment. AddPack gained hideTrigger (standalone, outside a dropdown) and onCreated (host redirect).

Note: the backend query nomad.getNomadPack already landed in main (bundled into cea80c121 during a concurrent release), so this PR is frontend-only. tsc --noEmit clean; biome-formatted.

Pairs with the registry site button (Nomploy/nomad-packs#128, merged) and the CI smoke-test (Nomploy/nomad-packs#127, merged).

🤖 Generated with Claude Code

The Nomad Pack gallery deployed with defaults only. Now picking a pack opens a
configure step: it fetches the registry's per-pack JSON (api.nomad.getNomadPack)
and renders a form from the pack's variable schema — scalar vars only, plumbing
vars (job_name/namespace/datacenters/constraints) hidden, secrets masked,
placeholder ("change-me") vars required. The chosen values are serialized to the
pack var-file (composeFile, HCL) so `nomad-pack run --var-file` picks them up.
Quick facts (tasks/ports/bundled DB) are shown; packs with no schema fall back to
"create with defaults". Also adds optional deep-link props (defaultOpen /
initialPackName / initialRegistryUrl) for a future "Deploy to Nomploy" link.

Backend query getNomadPack already landed in main (cea80c1).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Thank you for your contribution! Please sign our Contributor License Agreement by posting the following comment:


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Adds /dashboard/deploy-pack?pack=<id>&registry=<url> — the target of a
"Deploy to Nomploy" link from a pack registry (e.g. packs.nomploy.com). The
logged-in user picks a project + environment (auto-selected when there's only
one), then the Nomad Pack configure dialog opens pre-filled with that pack; on
success it jumps to the environment.

AddPack gains `hideTrigger` (render standalone, outside a dropdown menu, driven
by defaultOpen) and `onCreated` (host page redirect) to support this.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pipozzz pipozzz changed the title feat(packs): configure pack variables before deploy feat(packs): configure-and-deploy from registry (variables form + deploy-pack landing) Sep 28, 2026
pipozzz and others added 2 commits September 30, 2026 09:27
Guard projectList[0] / environments[0] behind a local so tsc narrows them —
the surrounding length checks already made these runtime-safe, but the prod
build (tsconfig noUncheckedIndexedAccess) flagged them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pipozzz
pipozzz merged commit 4368edb into main Sep 30, 2026
1 check passed
@pipozzz
pipozzz deleted the feat/pack-configure-form branch September 30, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant