Split Dockerfile into lint + build stages for faster CI feedback #151

Closed
opened 2026-03-01 19:27:09 +01:00 by clawbot · 0 comments
Collaborator

Per sdlc-manager#6: split the Dockerfile into separate stages so lint failures surface faster and we stop downloading golangci-lint on every build.

Proposed structure:

  1. Lint stage: Use golangci/golangci-lint image (pinned by sha256). Run golangci-lint run and make fmt-check.
  2. Build stage: Use standard golang image (pinned by sha256). Run make test and make build.
  3. Final stage: Unchanged.

Benefits:

  • Lint failures fail in seconds (no golangci-lint download)
  • make fmt-check also fails fast in lint stage
  • Build stage only does tests + compile
  • Eliminates repeated golangci-lint downloads
Per [sdlc-manager#6](https://git.eeqj.de/clawbot/sdlc-manager/issues/6): split the Dockerfile into separate stages so lint failures surface faster and we stop downloading golangci-lint on every build. **Proposed structure:** 1. **Lint stage**: Use `golangci/golangci-lint` image (pinned by sha256). Run `golangci-lint run` and `make fmt-check`. 2. **Build stage**: Use standard `golang` image (pinned by sha256). Run `make test` and `make build`. 3. **Final stage**: Unchanged. Benefits: - Lint failures fail in seconds (no golangci-lint download) - `make fmt-check` also fails fast in lint stage - Build stage only does tests + compile - Eliminates repeated golangci-lint downloads
clawbot added the bot label 2026-03-01 19:27:18 +01:00
clawbot self-assigned this 2026-03-01 19:27:19 +01:00
clawbot removed their assignment 2026-03-01 19:33:12 +01:00
sneak closed this issue 2026-03-01 21:19:22 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/upaas#151