Repository navigation
Conversation
lgfa29
left a comment
There was a problem hiding this comment.
Neat! I should really work on standardizing our release flows 🙃
| GORELEASER ?= go tool -modfile tools/go.mod goreleaser | ||
| KO ?= go tool -modfile tools/go.mod ko |
There was a problem hiding this comment.
I'm not sure how useful it would be in this case, since we only seem to be using two tools for now, but in Terraform I don this:
https://github.com/oxidecomputer/terraform-provider-oxide/blob/8934dfd92115dadcbdaed5813c5d836c52e0e276/Makefile#L33
|
|
||
| before: | ||
| hooks: | ||
| - make manifests VERSION={{ .Version }} |
There was a problem hiding this comment.
I imagine .Version is the tag, but I'm not sure where it's been set. Is it a "magical" value provided by goreleaser?
There was a problem hiding this comment.
It's magically provided by goreleaser. It's basically the tag without a "v" prefix. Different types of builds can produce a suffix like -SNAPSHOT, but all derived by tag unless overridden. There's a whole list of magical vars you can use for templating with goreleaser: https://goreleaser.com/customization/general/templates/
Description:
This PR changes the release process to use
kofor container image building andgoreleaserto manage building and releasing assets to github releases.koremoves the release dependency on a container runtime since it can build images without a runtime. I kept the build helper to load into whatever runtime you are using for local dev. This makes the release process similar to CAPOx and Karpenter.A lot of the changes shift responsibility from shell commands in the workflows to rely on
goreleaserto do those things with the.goreleaser.yamlconfig.A few differences:
VERSIONfile and instead we just use the tag. This reduces the steps to trigger a release to 1 tag push.gcr.io/distroless/static-debian12:nonrootto 13 since 12 is deprecated.argsinstead of a command path.koplaces the binary in/ko-app/, which is also in thePATH, and sets theentrypointto/ko-app/oxide-cloud-controller-manager. This means that old helm charts will not work after this PR merged with new images, but old images will work with new charts since the old image has anentrypointofoxide-cloud-controller-manager. This is mostly a non-issue since most users will take helm + image as the full release asset.Testing:
I tested the release process in a separate repo. You can see the release here: https://github.com/bwagner5/oxccm/releases/tag/v0.0.4
Tested release on a real cluster to ensure functionality
make buildworks locally with a docker runtime