-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat(ci): chart release workflow #71
Conversation
14c3082
to
02459e3
Compare
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.
@tthvo thanks for taking this on! I've been trying to think of ways we can make this work with the Chart Releaser Action. What about making the workflow manual only?
https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
It should allow us to run the workflow on a branch (when we're ready to release), and then leave the rest up to the Chart Releaser Action?
Oh yes manual trigger sounds good! I am just concerned about these requirements: https://github.com/helm/chart-releaser-action#pre-requisites It requires |
Do you mean the release notes drafter? |
Oh no i mean our upstream website here: https://github.com/cryostatio/cryostatio.github.io. I remember we want to host the chart repository under |
Oh right. Are we able to add the |
Oh wait now that it makes sense about the submodule. I think its really possible. In this PR, I am doing updates manually and triggered on every tag release. Do u think its easier this way or submodule is better? |
Sorry, what updates are you referring to? Also, I thought of another problem. The Release Drafter action creates draft releases, which will probably conflict with the releases that the Chart Releaser Action tries to make. I think it should actually be possible to substitute GitHub's built-in release notes generator for this action. We add a file to customize the format of the release notes, using labels as we do currently: The Chart Releaser Action uses the GitHub Release API to generate release notes if they're not provided. Unfortunately this API doesn't provide a way to specify the previous tag to compare against. It does have a separate API to do this and return the release notes as JSON: https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#generate-release-notes-content-for-a-release We can call this API inside the workflow which should already have the GitHub CLI installed:
We can use jq to grab the body from the response and output it to a file. Then create a config.yaml with We might be able to use this action to quickly compute the previous semver tag. If not it should be easy to do ourselves. |
Sorry I am referring to updates to this
Ah yes! I will look into the direction then if we go with submodule + Release Action then. |
The submodule seems like it would avoid you having to do this. I would concentrate first on getting the workflow working in this repository. Once that's done we can see how to integrate it into the website. Hopefully it's as easy as it sounds.
I filed #76 since it's tangential, but releated work. |
Thanks I will get back to this after PTO then. I think it should be easy enough to have |
6d27465
to
95d8746
Compare
Signed-off-by: Thuan Vo <thvo@redhat.com>
Reference error: The release note file ".github/release-notes.md", is not present in the chart package
@ebaron @andrewazores Ready for review again. Here are a sample run on my fork: Release: https://github.com/tthvo/cryostat-helm/releases Gh-pages update: https://github.com/tthvo/cryostat-helm/tree/gh-pages (see Action Run: https://github.com/tthvo/cryostat-helm/actions/runs/5350680838/jobs/9703606956 |
I got some issue when testing the release note on my fork as nothing was reported. However, when testing on upstream, the release note is generated correctly (i.e. using my upstream branch as main does not have config file): $ gh api --method POST -H "Accept: application/vnd.github+json" /repos/cryostatio/cryostat-helm/releases/generate-notes -f tag_name='v0.4.0' -f target_commitish='helm-release' -f previous_tag_name='v0.3.0' | jq -r .body
<!-- Release notes generated using configuration in .github/release.yml at helm-release -->
## What's Changed
### 🚀 Features
* feat(deploy): minimal parameter for deploying Cryostat without grafana and datasource by @tthvo in https://github.com/cryostatio/cryostat-helm/pull/66
* feat(ci): workflow to lint and test charts by @tthvo in https://github.com/cryostatio/cryostat-helm/pull/73
### 🔧 Fixes
* fix(chart): consider pre-release versioning by @ebaron in https://github.com/cryostatio/cryostat-helm/pull/59
* fix(deploy): set CRYOSTAT_K8S_NAMESPACES by @ebaron in https://github.com/cryostatio/cryostat-helm/pull/58
* fix(secret): use release name in database secret by @tthvo in https://github.com/cryostatio/cryostat-helm/pull/65
* fix(note): fix incorrect service field in NOTES.txt by @tthvo in https://github.com/cryostatio/cryostat-helm/pull/68
* fix(ci): increase timeout for chart testing process by @tthvo in https://github.com/cryostatio/cryostat-helm/pull/74
### ⚙️ Maintenance
* chore(github): add pr + issue templates + add release drafter by @maxcao13 in https://github.com/cryostatio/cryostat-helm/pull/56
* ci(mergify): update config for latest release branch by @tthvo in https://github.com/cryostatio/cryostat-helm/pull/55
## New Contributors
* @maxcao13 made their first contribution in https://github.com/cryostatio/cryostat-helm/pull/56
**Full Changelog**: https://github.com/cryostatio/cryostat-helm/compare/v0.3.0...v0.4.0
|
Also, i wonder if we could initialize the gh-pages branch with an intial I already generated one here: cryostatio/cryostatio.github.io@95076a5#diff-09d0d2fba18742bdcc0d3f6a345da7e93c6522d1fdf5bcb02a9ed5d47b05219c |
That should be fine. |
Nice thanks! Created and cleaned up for upstream I will rebase it after this PR just to mark where it all started. |
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.
Looks good! Thanks a lot @tthvo, excellent work as always!
* feat(ci): chart release workflow Signed-off-by: Thuan Vo <thvo@redhat.com> * ci(release-config): adjust release config category labels * feat(helm-release): use github auto-generated release notes * ci(helm-release): add missing github token * ci(release-notes): put release notes into chart packages Reference error: The release note file ".github/release-notes.md", is not present in the chart package * ci(release): manually compute previous tag * ci(release): reuse previous step output --------- Signed-off-by: Thuan Vo <thvo@redhat.com> (cherry picked from commit 04c9baa)
* feat(ci): chart release workflow Signed-off-by: Thuan Vo <thvo@redhat.com> * ci(release-config): adjust release config category labels * feat(helm-release): use github auto-generated release notes * ci(helm-release): add missing github token * ci(release-notes): put release notes into chart packages Reference error: The release note file ".github/release-notes.md", is not present in the chart package * ci(release): manually compute previous tag * ci(release): reuse previous step output --------- Signed-off-by: Thuan Vo <thvo@redhat.com> (cherry picked from commit 04c9baa) Co-authored-by: Thuan Vo <thvo@redhat.com>
Fixes #8
Fixes #76
Depends on #73 (i.e. restructure chart directory)
Depends on cryostatio/cryostatio.github.io#132
Release CI for helm charts. Release drafter is replaced with Github automated release note generations to avoid conflict with helm-releaser-actions. See #76.