Make the IPAM CLI plugin installable via datumctl#65
Open
scotwells wants to merge 4 commits into
Open
Conversation
Tagged releases now build and publish the milo-ipam datumctl plugin as
per-platform archives plus a checksums.txt, attached as GitHub release
assets.
- .goreleaser.yaml builds milo-ipam from ./cmd/milo-ipam for
linux/darwin/windows on amd64/arm64. The archive name_template renders
OS title-cased and amd64 as x86_64, producing the exact asset names the
datumctl plugin catalog expects:
milo-ipam_Linux_x86_64.tar.gz milo-ipam_Linux_arm64.tar.gz
milo-ipam_Darwin_x86_64.tar.gz milo-ipam_Darwin_arm64.tar.gz
milo-ipam_Windows_x86_64.zip milo-ipam_Windows_arm64.zip
plus checksums.txt covering all archives. The binary inside each archive
is milo-ipam (milo-ipam.exe on Windows).
- release.yml gains a publish-plugin job that runs goreleaser on version
tags only, leaving the existing container-image and kustomize-bundle
publishing jobs untouched.
- dist/ is gitignored.
Match the plugin's --plugin-manifest description to the catalog entry: 'Manage IP address space (pools and prefixes) across the platform'.
Make pluginVersion an ldflags-overridable var and have goreleaser inject the
release version (-X main.pluginVersion={{ .Version }}) at build time, so a
published milo-ipam reports the version it was released under instead of a
hardcoded constant. Local/dev builds keep the in-source default.
A plain 'go build' previously reported 0.1.0, making a local build indistinguishable from the released 0.1.0. Default to 0.0.0 so an unreleased build is unambiguous; release builds still get the real tag injected via ldflags.
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.
What this delivers
Makes the IPAM command-line experience installable for every user, on any platform, in one command. Once this ships and a release is cut, anyone can do:
IPAM lets teams manage their IP address space — provision pools and claim prefixes. This is the packaging that puts that experience one command away on Linux, macOS, and Windows (amd64 and arm64), instead of asking people to clone the repo and build a binary.
How it works
Cutting a version tag now builds the IPAM plugin for every supported platform, packages each build into an archive alongside a checksums file, and attaches them to the GitHub release. Each published binary reports the version it was released under, and the release is exactly what the datumctl plugin catalog downloads and verifies when someone installs IPAM — so the plugin is delivered straight from the project's own release. The existing container-image and kustomize-bundle publishing is unchanged, and the new packaging only runs on version tags.
Assets produced
Verified locally with a snapshot build: all six archive names match the catalog contract exactly, each archive contains a
milo-ipambinary that reports the release version, and the checksums file covers every archive.How it fits together
After merge
v*tag → the release publishes the archives + checksums file.sha256values in Register the IPAM CLI plugin cli-plugins#1 (plugins/ipam.yaml) with the real checksums from the release.