-
Notifications
You must be signed in to change notification settings - Fork 113
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: support chart release-notes or changelog #137
Conversation
543a3d9
to
518085e
Compare
Signed-off-by: Ahmed AbouZaid <[email protected]>
518085e
to
b0952eb
Compare
Hi @unguiculus @scottrigby |
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 PR, can you add some tests?
Signed-off-by: Ahmed AbouZaid <[email protected]>
837f02c
to
b7845bf
Compare
@cpanato The unit tests and docs have been added. |
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, just a comment that i think need to be empty and not a filename prefilled
6cc2e1f
to
aa5ae36
Compare
Signed-off-by: Ahmed AbouZaid <[email protected]>
aa5ae36
to
16090e3
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.
lgtm
@cpanato that's great, thanks a lot 👍 |
@aabouzaid looking at the code I can't see any logic to pick the correct notes out of a CHANGELOG, is this correct or have I missed something? |
@stevehipwell That's correct, it doesn't So whatever in the file will be used. The user is responsible to put what they need there. Putting any logic to select from the file will couple chart-releaser with a certain format, and there are a lot of them there. |
@aabouzaid how would you expect this to work then? I guess a local workflow would be to copy part of your changelog to a temp file, but how would it work via automation? Wouldn't picking a CHANGELOG format such as Keep a Changelog have been a better bet here? This would work with automation (specifically the GitHub action) and would also let you capture the Artifact Hub change annotations in index.yaml as part of the same process. |
@stevehipwell as an example: I've implemented one approach here: https://github.com/chgl/charts/blob/master/.github/generate-chart-changelogs.sh where a changelog.md is generated from the chart.yaml's artifacthub annotations as part of the release process. |
@chgl the chart annotations are transient so not the best starting point. IMHO this would be best driven from a structured CHANGELOG. |
@stevehipwell Most if not all tools I saw that generates the CHANGELOG file are able to generate the changelog for a certain tag. I use git-chglog with Also I use that file to update ArtifactHub annotation in the Chart.yaml file. And as you can see from @chgl comment, everyone makes it differently, and adding the logic to chart-releaser will make it harder for many use cases. |
Thanks for your example @aabouzaid. However I think for generic use a workflow needs to work without needing to add repo commits. That said with a couple of small features added this could be supported with minimal additional steps and almost certainly work with the
|
@stevehipwell it doesn't work that way, unfortunately. If you took a look at the code you will find that the In the current solution, you don't need to commit the release notes file to git but it should be in the Helm chart archive package (for the same reason, chart-releaser upload works the archived packages, not the source code). Also, chart-releaser doesn't work with individual charts, it works with any charts in the working path (one or more, it doesn't matter) which means it's not possible to run external commands or Github Actions between each chart upload. Here is how I do it with the new feature in this PR:
|
@aabouzaid I'm pretty sure that the Artifact Hub code supports annotations in the index as well as in the packaged chart. I've automated my release markdown notes from a CHANGELOG.md in each chart directory without this feature. But it would be easier using this feature if it supported chart relative paths. |
At the moment there is no way to set charts release-notes/changelog.
This PR adds an option to set the charts release-notes/changelog by looking for
release-notes.md
file.