mesh/merge-gate head d94764f00168 merged into trunk fadf5025cc5a — pass: builds build-agent, route-proxy → ace, g14, novox, shanks; no bus step; every mach…
mesh/repo-check head d94764f00168 merged into trunk fadf5025cc5a — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-…
mesh/delivery stopped: its group fix/a-module-moves-only-when-its-program-changes stopped: novox/mesh-controller@b34055f580d4 failed
mesh/delivery-group group fix/a-module-moves-only-when-its-program-changes delivering: 1 of 2 delivered; novox/mesh-catalog@d94764f00168, stopped for a member …
Go's build ID hashes every input package, so a change mesh-builder never reaches still changed its bytes; without it, a rebuild of the same program is the same file, and the check can say the module is unchanged.
27 lines
1.5 KiB
Docker
27 lines
1.5 KiB
Docker
ARG GO_BASE
|
|
ARG ALPINE_BASE
|
|
# build-agent's image: the build machine itself, compiled into a container (novox/hq ADR 0190).
|
|
#
|
|
# **The source is not vendored here.** builder's actual code — cmd/mesh-builder, internal/builder,
|
|
# internal/catalogue — lives in the mesh-controller repository, the same control plane it is one
|
|
# half of. This module ships the packaging, not a second copy of the source, so the build context
|
|
# is the mesh-controller repository (declared under build.artifacts[].context), and this
|
|
# Dockerfile compiles ./cmd/mesh-builder from it — the same shape route-proxy already uses for the
|
|
# same reason. The build seat hands it only that program's build source (novox/hq ADR 0267, the
|
|
# artifact's `compiles`): a merge elsewhere in that repository does not move this image.
|
|
FROM ${GO_BASE} AS build
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -buildvcs=false -ldflags=-buildid= -o /mesh-builder ./cmd/mesh-builder
|
|
|
|
# Unlike mesh-controller's own FROM scratch (ADR 0006: nothing to audit but one binary), the build
|
|
# machine's whole job is shelling out to git and docker — it needs a real userland to do that in,
|
|
# not a second copy of either tool vendored into this image. apk installs both from the base's own
|
|
# packages, not fetched on its own at build time.
|
|
FROM ${ALPINE_BASE}
|
|
RUN apk add --no-cache docker-cli git
|
|
COPY --from=build /mesh-builder /usr/local/bin/mesh-builder
|
|
ENTRYPOINT ["/usr/local/bin/mesh-builder"]
|