Skip to content

build(gorilla-merger): containerize via BuildKit secret (unblocks #310 CI) - #312

Merged
zzylol merged 1 commit into
feat/gorilla-compactorfrom
feat/gorilla-merger-docker
May 23, 2026
Merged

zzylol merged 1 commit into
feat/gorilla-compactorfrom
feat/gorilla-merger-docker

Conversation

@zzylol

@zzylol zzylol commented May 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Multi-stage gorilla-merger/Dockerfile that builds cmd/gorilla-merger and fetches the private github.com/ProjectASAP/asap-gorilla-go module cleanly.
  • Uses a BuildKit secret (--secret id=gh_token) for the GitHub token: mounted only for the fetch/build RUNs, never baked into an image layer. A transient in-container url.insteadOf git rewrite + GOPRIVATE=github.com/ProjectASAP/* lets go mod download/go build resolve the private dep. The git config lives only in the build container, never on the host.
  • Adds a gorilla-merger/README.md documenting the exact build invocation, ports/flags, and the CI note below.

Why this targets feat/gorilla-compactor (not main)

The gorilla-merger/ module only exists on the merger branch (PR #310); it is not on main yet. This PR stacks on #310 and unblocks #310's CI: the same GOPRIVATE + gh_token secret requirement applies to the ASAPQuery-backend CI runner before #310 can merge (a naive go build/go test of gorilla-merger/ 404s on the private module).

Verification

  • GOPRIVATE=github.com/ProjectASAP/* go vet ./... — clean (exit 0).
  • DOCKER_BUILDKIT=1 docker build --secret id=gh_token,src=<tokenfile> -t asap/gorilla-merger:dev gorilla-merger/ — builds; private go mod download + go build succeed; final image is 86MB distroless; the binary parses all flags.

Test plan

  • CI: expose a gh_token BuildKit secret (or url.insteadOf token) so go build/go test ./gorilla-merger/... can fetch the private module.
  • Confirm asap/gorilla-merger:dev builds in CI with the secret wired.

🤖 Generated with Claude Code

…odule fetch

The merger imports the private github.com/ProjectASAP/asap-gorilla-go
module, so a naive `go build` in Docker/CI 404s/auth-prompts on the
fetch. The multi-stage Dockerfile mounts a GitHub token as a BuildKit
secret (never baked into a layer) and sets a transient in-container
url.insteadOf git rewrite + GOPRIVATE so `go mod download`/`go build`
resolve the private dep. Verified: image builds (86MB distroless) and
the binary parses all flags.

The same GOPRIVATE + gh_token-secret requirement applies to
ASAPQuery-backend CI before PR #310 can merge (documented in the README).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit 654e5ae into feat/gorilla-compactor May 23, 2026
@zzylol
zzylol deleted the feat/gorilla-merger-docker branch July 17, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant