Repository navigation
Conversation
Test this build on the clusterlinux/amd64
Or build this branch yourself — straight from GitHub, no clone needed: docker buildx build --platform linux/amd64 --target binary --output type=local,dest=dist "https://github.com/WATonomous/watcloud-cli.git#40/build-binary-via-docker"The binary lands at |
alexboden
force-pushed
the
40/build-binary-via-docker
branch
from
November 8, 2026 03:53
2917635 to
4d9299b
Compare
Add a Dockerfile as the single source of truth for building the binary and route both CI and releases through it, so developers can build and test the exact cluster binary without a local Go toolchain. The cluster runs linux/amd64. Building that from an arm64 laptop previously meant cross-compiling by hand; the Dockerfile produces the static linux/amd64 binary on any host via `docker buildx build --output type=local,dest=dist`. It mirrors the former release flags (CGO_ENABLED=0, stripped, trimpath) so the artifact is reproducible across local, CI and release builds. ci.yml (new, on pull_request) builds through the Dockerfile, uploads the binary as the watcloud-linux-amd64 artifact, and posts/updates a PR comment with a download link, checksum and the build command, so a PR can be tested on the cluster before merge. release.yml now builds through the same Dockerfile instead of an inline `go build`, making the Dockerfile the authoritative build. Resolves #40
alexboden
force-pushed
the
40/build-binary-via-docker
branch
from
November 8, 2026 03:59
4d9299b to
f4ac8d6
Compare
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.
Motivation
Resolves #40. The cluster runs
linux/amd64, but there was no easy way to build and test that binary from a dev machine (e.g. an arm64 laptop) or straight from a PR. Developers had to cross-compile by hand, and release.yml built the binary with an inlinego buildthat nothing else reused.Change
Add a
Dockerfileas the single source of truth for building the binary. It produces a staticlinux/amd64binary on any host and mirrors the former release flags (CGO_ENABLED=0, stripped,-trimpath), so the artifact is reproducible across local, CI, and release builds:docker buildx build --platform linux/amd64 --target binary --output type=local,dest=dist .The binary lands at
dist/watcloud.Add
ci.yml(onpull_request): builds through the Dockerfile, uploads thewatcloud-linux-amd64artifact, and posts/updates a PR comment with a download link, checksum, and the build command — so a PR can be tested on the cluster before merge.Point
release.ymlat the same Dockerfile instead of the inlinego build, making the Dockerfile authoritative.Document the Docker build flow in the README and add
.dockerignore/dist/ignore.How to apply
No infra-config change required for the tooling itself. The next release still publishes a
watcloudasset and the infra-config bump snippet is unchanged.Checklist
watcloud --helpin a linux/amd64 container).