Repository navigation
CD: publish images to GHCR, create Sentry releases, deploy to dev #10
Copy link
Copy link
Open
Labels
infrastructureTerraform, Azure, CI/CD, operationsTerraform, Azure, CI/CD, operations
Milestone
Description
Temporary routing (2026-10-08): Pull requests publish to GHCR and deploy that SHA to Azure
dev. Merges tomaindeploy to prod. Prod is fail-closed until #12 / prod secrets exist. This overridesmain→devin the original body. Draft CD: #67. ADR 0010.
Context
CI already checks every PR: lint, type-check, tests with coverage, build and Docker build. CD now publishes images (PR 67). Azure dev apply (#9) is blocked on GHCR 401 until the package exists and is public.
Depends on #9 for the Container App itself. Prod stack is #12.
Goal (temporary)
- PRs →
ghcr.io/pixelbar/pixel:<sha>+ deploy to Azuredev main→ same image toward prod (fail closed if Terraform/secrets are missing)- Original goal (
main→dev, prod later with approval) is paused until this routing is reverted.
Scope
- Publish images:
ghcr.io/pixelbar/pixeltagged with the git SHA (andpr-<n>/ movingmain). The package is public, because the image holds no secrets - Deploy to
devfrom PRs: roll out the SHA, authenticating to Azure with OIDC (Terraform bootstrap: remote state and GitHub OIDC #8) - Deploy to prod from
main: only when Prod environment, approval gate and go-live in the Pixelbar server #12 and prod Key Vault secrets exist; never copy the Mini/dev Discord token - Sentry release (still later): a release per deploy, with source maps uploaded so stack traces point at the TypeScript source
- Command registration (still later): register slash commands as part of the deploy
Acceptance criteria
- A PR SHA is pullable from GHCR (package public) and, once
pixel-devexists andARM_*is set, that SHA is running ondev(one replica) - Merge to
mainpublishes the SHA; prod deploy fails closed until Prod environment, approval gate and go-live in the Pixelbar server #12 / prod secrets exist - Verified that the image contains no
.env, access lists, block list or other secrets - A failed deploy leaves the app on the previous working version, or rollback is one documented step
- Workflow permissions stay minimal: only the publishing job can write packages
- Actions pinned to commit SHAs, as in the existing CI
- Sentry shows the release, and stack traces map to
.tsfiles and lines (later)
Considerations
- Provenance and SBOM for published images would be nice to have
- Whether to register commands from CI or from the app on startup
- Image tags: SHA pin plus moving
pr-<n>/main; neverlatestas the only pin
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
infrastructureTerraform, Azure, CI/CD, operationsTerraform, Azure, CI/CD, operations
Activity
NinjaLikesCheez commentedon Oct 8, 2026
Temporary routing (2026-10-08). Thomas asked to ship CD as:
ghcr.io/pixelbar/pixel:<sha>and Azuredev(pixel-dev, one replica)main→ prod (fail closed untilinfra/envs/prod/ prod secrets exist)That overrides the
main→devgoal in this issue. Draft: #67 (ADR 0010).Still later on this issue: Sentry releases + source maps, and
just registerfrom CD. GHCR auth isGITHUB_TOKENon the publish job only (packages: write). Prod must not get the Mini/Pixel Dev Discord token.NinjaLikesCheez commentedon Oct 8, 2026
Routing update: Azure
devis now a local build (just deploy-devon the Mini), not PR CI — so you can test this tree without another CI head overwriting the one replica.mainstill publishes GHCR and is the prod release (fail closed until #12). Draft: #67.CD: local just deploy-dev for Azure dev; main → prod (#67)
NinjaLikesCheez commentedon Oct 8, 2026
Routing update: prod is not ready (#12), so CD on
mainno longer deploys to prod. Merges still publishghcr.io/pixelbar/pixel:<sha>(package is already public). Azuredevstaysjust deploy-dev(one replica). Draft: #68.That PR also starts the next #10 slice: Sentry source maps +
just registerondeploy-dev. Releases skip until Thomas setsSENTRY_ORG/SENTRY_PROJECT/SENTRY_AUTH_TOKEN.ARM_*on Environmentdevis still unset (Terraform plan skips). Do not copy the Mini/Pixel Dev Discord token into prod.