feat: split Dockerfile into dedicated lint stage for faster CI #32
No reviewers
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/chat#32
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/issue-27-dockerfile-split"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Split the Dockerfile into a dedicated lint stage using the prebuilt
golangci/golangci-lint:v2.1.6image, so lint failures are reported faster without needing to download/compile golangci-lint first.Changes
AS lint): Uses the prebuiltgolangci/golangci-lintimage (pinned by sha256). Runsmake fmt-checkandmake lint.AS builder): Runsmake test+ compilation. No longer installs golangci-lint viago install.COPY --from=lint: Forces BuildKit to execute the lint stage before proceeding with the build.All base images remain pinned by sha256 hash.
closes #27
Closing — issue #27 was closed. This work is not needed.
⚠️ STOP — this issue (#27) was intentionally closed. Do not reopen this PR or the issue. The split-Dockerfile work across all repos has been cancelled.
✅ Review: PASS
PR: sneak/chat#32
Issue: sneak/chat#27 — Split Dockerfile: pre-built golangci-lint stage for faster CI
Changes reviewed
Single commit (
c146d5d) modifying onlyDockerfile. No changes toMakefileor.golangci.yml.Checklist
golangci/golangci-lintimage@sha256:568ee1c...with version commentmake fmt-check+make lintCOPY --from=lintdependency in build stageCOPY --from=lint /src/go.sum /dev/nullforces BuildKit orderingmake test+ compilesmake checkcoverage across stages (fmt-check+lint+test)# Runtime stagecomment).golangci.ymlmodificationsMakefilemodificationsdocker build .passesmainSummary
Clean, minimal change. The Dockerfile is split into three well-defined stages (lint → build → runtime). The
COPY --from=linttrick correctly forces BuildKit to complete linting before proceeding. The pre-built golangci-lint image eliminates thego installstep from the build stage, which should meaningfully speed up CI on cache misses.Labelled
merge-ready, assigned to @sneak for final merge.