-
Notifications
You must be signed in to change notification settings - Fork 578
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
✨ use goreleaser for releasing binary #4748
✨ use goreleaser for releasing binary #4748
Conversation
Hi @kranurag7. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
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.
Thanks for this @kranurag7 . I like the use of goreleaser here and creating the draft release.
/milestone v2.4.0 |
This lgtm, but I am not familiar with the release process and therefore don't feel comfortable putting an actual review on this. |
From today's office hours: We'd like to have more maintainers/reviewers familiar with the current release process before changing this. /milestone v2.5.0 |
this seems fine to me although I never used goreleaser, for comparison this is what upstream does https://github.com/kubernetes-sigs/cluster-api/blob/main/.github/workflows/release.yaml Let's wait to cut v2.4.0 then merge this for subsequent releases? |
/retest |
After going through the v2.4.1 release process, we ran into #4881. Using goreleaser bypasses this. I tested this with the following process: gh pr checkout 4748
goreleaser release --snapshot --clean It created all the binaries faster than the existing Docker method did, along with tarballs including I'd like for Damiano to take a look at this too, but I think this is worth setting up for at least creating the release and uploading binaries. We can look at how the release notes and images get built later. I'm guessing we could roll the release notes process into this, but maybe not the image building/promotion. /lgtm /assign @damdo |
Hey there, I rebased the PR and I created a demo release on my fork. Other things like removing binaries existing binaries related make targets, updating release docs etc. can be done in a subsequent PR or even this PR as well. |
/hold Holding because there are some missing artifacts when releasing with this configuration. |
* Remove Windows format override * Move goreleaser invocation into the Makefile * Add output directory to goreleaser configuration * Use generated release notes as the release contents * Run make release target inside the GitHub workflow * Set expected environment variables in the GitHub workflow * Build goreleaser before running the release target Signed-off-by: Nolan Brubaker <[email protected]>
Updated code incoming, but I was able to successfully create a release with the custom release notes on my fork: https://github.com/nrb/cluster-api-provider-aws/releases/tag/v2.8.0 🎉 |
* Remove Windows format override * Move goreleaser invocation into the Makefile * Add output directory to goreleaser configuration * Use generated release notes as the release contents * Run make release target inside the GitHub workflow * Set expected environment variables in the GitHub workflow * Build goreleaser before running the release target * Force goreleaser to use local config * Set RELEASE_TAG env variable for release notes * Output env vars for debugging * Re-enable changelog support Signed-off-by: Nolan Brubaker <[email protected]>
/unhold |
@@ -0,0 +1,64 @@ | |||
builds: |
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.
Note for @richardcase since you asked about it before - the changelog.disabled
flag actually disabled posting a changelog/release notes entirely; even customized ones passed via --release-notes
. The --release-notes
flag is what overrides the Goreleaser changelog generation.
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.
Noted and understood, thanks @nrb . I mentioned it more in the context that currently the makefile would generate and attach the release notes. But if we are attaching the custom release notes directly with goreleaser then great 👍
Signed-off-by: Nolan Brubaker <[email protected]>
/retest |
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.
/lgtm
/assign @richardcase
Great work @kranurag7 and @nrb , this is a real quality of life improvement 🎉 /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: richardcase The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherry-pick release-2.4 The We worked around this for v2.4.2, but the cherry-pick will be useful for releases going forward. |
@nrb: #4748 failed to apply on top of branch "release-2.4":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
* use goreleaser for releasing the binaries Signed-off-by: Anurag <[email protected]> * disable releasing of binaries using make targets since we intend to use goreleaser now, we can remove the make targets. This commit does the same. Signed-off-by: Anurag <[email protected]> * Update release-binaries target to use goreleaser * Add goreleaser as a tool dependency * Update .goreleaser configuration to upload YAML templates as GitHub release artifacts * Create binaries rather than archives to mimic current uploads. Signed-off-by: Nolan Brubaker <[email protected]> * Update documentation and remove unused targets Signed-off-by: Nolan Brubaker <[email protected]> * Remove unused gh targets/client Signed-off-by: Nolan Brubaker <[email protected]> * Updates based on doing dry runs * Remove Windows format override * Move goreleaser invocation into the Makefile * Add output directory to goreleaser configuration * Use generated release notes as the release contents * Run make release target inside the GitHub workflow * Set expected environment variables in the GitHub workflow * Build goreleaser before running the release target Signed-off-by: Nolan Brubaker <[email protected]> * Updates based on doing dry runs * Remove Windows format override * Move goreleaser invocation into the Makefile * Add output directory to goreleaser configuration * Use generated release notes as the release contents * Run make release target inside the GitHub workflow * Set expected environment variables in the GitHub workflow * Build goreleaser before running the release target * Force goreleaser to use local config * Set RELEASE_TAG env variable for release notes * Output env vars for debugging * Re-enable changelog support Signed-off-by: Nolan Brubaker <[email protected]> * Remove reference to unused steps Signed-off-by: Nolan Brubaker <[email protected]> --------- Signed-off-by: Anurag <[email protected]> Signed-off-by: Nolan Brubaker <[email protected]> Co-authored-by: Nolan Brubaker <[email protected]>
* use goreleaser for releasing the binaries Signed-off-by: Anurag <[email protected]> * disable releasing of binaries using make targets since we intend to use goreleaser now, we can remove the make targets. This commit does the same. Signed-off-by: Anurag <[email protected]> * Update release-binaries target to use goreleaser * Add goreleaser as a tool dependency * Update .goreleaser configuration to upload YAML templates as GitHub release artifacts * Create binaries rather than archives to mimic current uploads. Signed-off-by: Nolan Brubaker <[email protected]> * Update documentation and remove unused targets Signed-off-by: Nolan Brubaker <[email protected]> * Remove unused gh targets/client Signed-off-by: Nolan Brubaker <[email protected]> * Updates based on doing dry runs * Remove Windows format override * Move goreleaser invocation into the Makefile * Add output directory to goreleaser configuration * Use generated release notes as the release contents * Run make release target inside the GitHub workflow * Set expected environment variables in the GitHub workflow * Build goreleaser before running the release target Signed-off-by: Nolan Brubaker <[email protected]> * Updates based on doing dry runs * Remove Windows format override * Move goreleaser invocation into the Makefile * Add output directory to goreleaser configuration * Use generated release notes as the release contents * Run make release target inside the GitHub workflow * Set expected environment variables in the GitHub workflow * Build goreleaser before running the release target * Force goreleaser to use local config * Set RELEASE_TAG env variable for release notes * Output env vars for debugging * Re-enable changelog support Signed-off-by: Nolan Brubaker <[email protected]> * Remove reference to unused steps Signed-off-by: Nolan Brubaker <[email protected]> --------- Signed-off-by: Anurag <[email protected]> Signed-off-by: Nolan Brubaker <[email protected]> Co-authored-by: Nolan Brubaker <[email protected]>
* use goreleaser for releasing the binaries Signed-off-by: Anurag <[email protected]> * disable releasing of binaries using make targets since we intend to use goreleaser now, we can remove the make targets. This commit does the same. Signed-off-by: Anurag <[email protected]> * Update release-binaries target to use goreleaser * Add goreleaser as a tool dependency * Update .goreleaser configuration to upload YAML templates as GitHub release artifacts * Create binaries rather than archives to mimic current uploads. Signed-off-by: Nolan Brubaker <[email protected]> * Update documentation and remove unused targets Signed-off-by: Nolan Brubaker <[email protected]> * Remove unused gh targets/client Signed-off-by: Nolan Brubaker <[email protected]> * Updates based on doing dry runs * Remove Windows format override * Move goreleaser invocation into the Makefile * Add output directory to goreleaser configuration * Use generated release notes as the release contents * Run make release target inside the GitHub workflow * Set expected environment variables in the GitHub workflow * Build goreleaser before running the release target Signed-off-by: Nolan Brubaker <[email protected]> * Updates based on doing dry runs * Remove Windows format override * Move goreleaser invocation into the Makefile * Add output directory to goreleaser configuration * Use generated release notes as the release contents * Run make release target inside the GitHub workflow * Set expected environment variables in the GitHub workflow * Build goreleaser before running the release target * Force goreleaser to use local config * Set RELEASE_TAG env variable for release notes * Output env vars for debugging * Re-enable changelog support Signed-off-by: Nolan Brubaker <[email protected]> * Remove reference to unused steps Signed-off-by: Nolan Brubaker <[email protected]> --------- Signed-off-by: Anurag <[email protected]> Signed-off-by: Nolan Brubaker <[email protected]> Co-authored-by: Nolan Brubaker <[email protected]>
What type of PR is this?
/kind feature
What this PR does / why we need it:
For automating releases.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes: #4391 #4091
Related: #4610 #4309
Special notes for your reviewer:
Checklist:
Release note: