-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate goreleaser into repo #10459
Conversation
647e5dd
to
99ed46c
Compare
Signed-off-by: timflannagan <timflannagan@gmail.com>
99ed46c
to
7b07d89
Compare
- goreleaser has validation logic that denies LDFLAGS variable with quotes - various testing suites were failing trying to build and load our component container images Signed-off-by: timflannagan <timflannagan@gmail.com>
Signed-off-by: timflannagan <timflannagan@gmail.com>
Signed-off-by: timflannagan <timflannagan@gmail.com>
Makefile
Outdated
IMAGE_REGISTRY ?= quay.io/solo-io | ||
export IMAGE_REGISTRY ?= ghcr.io/kgateway | ||
export IMAGE_REPO ?= kgateway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming the image registry is causing the conformance suite to fail as our helm chart expects the quay.io/solo-io registry. I'm planning on fixing the helm chart + any other reference to this registry, but happy to do that in another PR if we want to keep these changes tightly scoped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it's good to fix so we don't break conformance CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree (I think), let's either no do any renaming yet or handle it all to not break conformance.
My preference is actually to not do any renaming in this PR but don't feel too strongly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgadban Agreed on holding off on any naming for now. I looked into doing this locally and it was a bit more involved than I would've liked. I'll do that renaming (adopting ghcr.io as the registry, renaming component images, etc.) in a follow-up and we can iron out what's best there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so when this PR merges we will begin releasing on every push to main?
also assuming we still need to configure GITHUB_TOKEN
etc?
Makefile
Outdated
IMAGE_REGISTRY ?= quay.io/solo-io | ||
export IMAGE_REGISTRY ?= ghcr.io/kgateway | ||
export IMAGE_REPO ?= kgateway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree (I think), let's either no do any renaming yet or handle it all to not break conformance.
My preference is actually to not do any renaming in this PR but don't feel too strongly
@lgadban I held off on this after the convo about exhausting runner budget in the free org with doing that. IMO I'd like to see us do that once the initial release GHA workflow is checked into the repo. |
…ge repo name Signed-off-by: timflannagan <timflannagan@gmail.com>
Signed-off-by: timflannagan <timflannagan@gmail.com>
Signed-off-by: timflannagan <timflannagan@gmail.com>
Signed-off-by: timflannagan <timflannagan@gmail.com>
Description
Overview
This commit integrates the goreleaser tool into the repository. Previously, we were relying on the legacy buildbot / cloudbuilder tooling to generate and publish release artifacts for this project. As we iterate on this project, we have the opportunity to modernize our release process with tooling and workflows consistent with the rest of the Go ecosystem.
New Release Workflow
With these changes, a new
release.yaml
GHA workflow has been introduced, which is responsible for configuring and invoking goreleaser under-the-hood (via therelease
Makefile target). Additionally, this workflow enables the following event triggers:main
: We ideally want to run a subset of the release pipeline on PRs to main or pushes to main to ensure our release pipeline isn't silently breaking until a new release needs to be cut.The workflow calls the
make release
target, which internally invokes the goreleaser CLI. While goreleaser provides its own third-party GHA, this approach helps ensure that local and CI environments use the same entry point. This consistency has the following advantages:For example, I could test out the full release pipeline works in my fork via the
make release IMAGE_REGISTRY=ghcr.io/timflannagan IMAGE_REPO=k8sgateway VERSION=devel GORELEASER_ARGS="--clean --skip=validate"
command.Why goreleaser?
The goreleaser project helps simplify our release workflow while meeting our requirements:
Additionally, there are several other features that we could explore adopting over time (e.g. artifact signing and SBOM generation).
Alternative - GHAs
An alternative approach to using goreleaser would be encoding the entire release pipeline directly within GHA workflow(s). While feasible, this approach has some trade-offs:
While GHAs provide flexibility, goreleaser offers a purpose-built tool for releases, reducing maintenance overhead and aligning with industry best practices for the Go ecosystem, and allows us to simplify the GHA release workflow by delegating release steps to a known tool.
Checklist:
Closes #10443.