Skip to content

Add manual deployment script as single source of truth#49

Merged
RaoulSchaffranek merged 5 commits into
mainfrom
add-deploy-script
Jul 24, 2026
Merged

Add manual deployment script as single source of truth#49
RaoulSchaffranek merged 5 commits into
mainfrom
add-deploy-script

Conversation

@RaoulSchaffranek

Copy link
Copy Markdown
Member

Why

CI is currently unavailable, so releases must be deployed to the Docker registry and Nix caches by hand. This adds scripts/deploy.sh, which reproduces the Release workflow's deployment steps, and rewires the workflow to call it — so the manual and CI paths can never drift.

What

scripts/deploy.sh — two subcommands mirroring the workflow's deploy jobs:

  • nix-cache: build komet-node once, push the closure to the k-framework cache (cachix), publish the binary to k-framework-binary (kup), then verify the push and pin.
  • docker: build the image, smoke-test it, push to Docker Hub; logs out on exit so credentials don't linger.
  • Preflight guards, all failing fast before the long build: required tools on PATH, a clean worktree (so a manual build is byte-for-byte what CI would produce and matches the published REV), and required secrets. ALLOW_DIRTY=1 overrides the worktree check.

scripts/README.md — manual-deployment runbook (prerequisites, secrets, and the full draft → deploy → finalize gh sequence).

.github/workflows/release.yml — the nix-cache and dockerhub jobs now invoke scripts/deploy.sh instead of duplicating the commands inline.

.dockerignore — exclude local secret/credential files (.env, .envrc, *.key, …) so a manual docker build . cannot bake them into a published image layer.

.devcontainer/ — install cachix and add the docker-in-docker feature so both subcommands run inside the container.

Notes

  • The GitHub-release orchestration (draft / cut / failure-cleanup) stays inline in the workflow; only the Docker + Nix deployment steps moved into the script. The runbook documents running those gh steps by hand.
  • Not exercised end-to-end here (no credentials in this environment); validated syntax, the CLI surface, the preflight/guard paths, and JSON validity.

CI is unavailable, so releases must be deployed by hand. Add
scripts/deploy.sh, which reproduces the Release workflow's deployment
steps, and have the workflow call it so the two never drift.

scripts/deploy.sh:
- nix-cache: build komet-node once, push the closure to the k-framework
  cache (cachix), publish the binary to k-framework-binary (kup), and
  verify the push and pin.
- docker: build the image, smoke-test it, push to Docker Hub; logs out
  on exit so credentials do not linger.
- Preflight guards: required tools on PATH, a clean worktree (so a
  manual build matches the published REV), and required secrets.

scripts/README.md: manual-deployment runbook.

release.yml: the nix-cache and dockerhub jobs now invoke the script
instead of duplicating the commands inline.

.dockerignore: exclude local secret/credential files so a manual
`docker build .` cannot bake them into a published image layer.

.devcontainer: install cachix and add the docker-in-docker feature so
both subcommands run inside the container.
Fold the manual-deployment runbook into CONTRIBUTOR.md ("Deploying a
release") and drop scripts/README.md so the contributor guide is the
single home for it. Repoint the references in deploy.sh and release.yml.
Use the conventional name so GitHub auto-links it in the PR and issue
UI. Update the references in deploy.sh and release.yml.
@RaoulSchaffranek
RaoulSchaffranek merged commit a73ee7b into main Jul 24, 2026
1 check failed
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