Release pipeline: goreleaser binaries and multi-arch ghcr image - #33
Merged
Conversation
goreleaser builds linux/darwin/windows binaries for amd64 and arm64 on tag push and publishes a multi-arch Docker image to ghcr.io via dockers_v2 (the dockers key is being phased out). The image bases on distroless/static for CA certificates (HTTPS to Gerrit) and a non-root user; the version stamps into main.version through ldflags. To verify locally: goreleaser release --snapshot --clean, then run the resulting image without env -- it must exit non-zero naming the missing variables. Refs: #21
Every push builds a full goreleaser snapshot -- all platform binaries plus the Docker images -- so release configuration breakage surfaces in review, not on tag day. The smoke test runs the amd64 image without env and requires a non-zero exit naming the missing variable, pinning the container's cold-start failure mode. Refs: #21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the release pipeline (frame Phase 5).
.goreleaser.yaml: linux/darwin/windows binaries for amd64+arm64 on tag push, version stamped intomain.versionvia ldflags; multi-arch Docker image published toghcr.io/gaijinentertainment/go-gerrit-mcpviadockers_v2(the legacydockerskey is deprecated).Dockerfile: distroless/static (CA certificates for HTTPS to Gerrit, non-root), binary injected per platform by goreleaser.release.yml: tag-push workflow — qemu + buildx + ghcr login + goreleaser.release-dry-runjob: full snapshot on every push plus an image smoke test — the container must exit non-zero and name the missing env vars when started without configuration.Validated locally:
goreleaser checkclean,release --snapshot --cleanproduced all six platform archives and both images, and the amd64 image exits 1 namingGERRIT_URL/GERRIT_USERNAME/GERRIT_TOKEN.Closes #21