🔧 Deploy workflows - Push each build to its own image tag, and let only the deploy job move the environment tag

Aperta
#2,811 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker, github-actions, nextjs, typescript
Ambito
ci-cd, devops

Direzione di ricerca

Start with the deploy workflow, build-and-deploy.yml, and trace how image tags move from the build job to deployment; check infra/modules/appService.bicep:86 to confirm which tag App Service reads. Then review the PR slot handling and clean-container-register.yml. Done when the build publishes a run-specific tag, only a successful deploy updates the environment tag, and PR slots and cleanup continue to work.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Claude Type: DevOps
Pain

The build job pushes the image straight to the environment tag (ssw-rules:production or ssw-rules:staging). The App Service reads that tag (infra/modules/appService.bicep:86). If a later job fails, the registry has an image that was never deployed, and a restart of the App Service can run it.

  • Today this occurs when the deploy job fails after the push (9 of the last 150 runs of build-and-deploy.yml).
  • With #2806, the build no longer waits for the infrastructure job, so a failed or rejected infrastructure job (2 of the last 150 runs) also leaves such an image.

Raised by Josh Berman in the review of #2806.

Acceptance Criteria
  1. The build job pushes the image only with a tag for its run (for example the commit SHA or the run ID).
  2. Only the deploy job moves the environment tag, after its checks pass.
  3. If any job before the deploy fails, the environment tag does not change.
  4. PR slots and the clean-up workflow (clean-container-register.yml) still work.
Related
  • #2801, #2806

🤖 Issue created by Claude Opus 5.5 via Claude Code

Lingua principale
TypeScript
Stelle
28
Fork
16
Merge medio
3g 13h
PR unite (30g)
19

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SSWConsulting/SSW.Rules

Tutte le issue di SSWConsulting/SSW.Rules

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.