-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[bitnami/*] ci: 👷 Add tag and changelog support #25359
Conversation
Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution. |
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.
Could you add those new CHANGELOG.md files to the .helmignore
so they are not bundled into the tarball?
Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
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
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.
Great work @javsalgar!
I've just left some comments about the CD pipeline, Could you give it a glance?
.github/workflows/cd-pipeline.yml
Outdated
@@ -25,6 +25,7 @@ jobs: | |||
with: | |||
path: charts | |||
fetch-depth: 2 # to be able to obtain files changed in the latest commit | |||
token: ${{ secrets.BITNAMI_BOT_TOKEN }} |
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.
Why is BITNAMI_BOT_TOKEN
required? This could trigger other workflows, is that expected? If you need write access to the repository you can change the permissions
section int the job definition.
charts/.github/workflows/cd-pipeline.yml
Lines 18 to 19 in ef3fea4
permissions: | |
contents: read |
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.
We need write access to push the tags
.github/workflows/cd-pipeline.yml
Outdated
@@ -59,6 +60,21 @@ jobs: | |||
with: | |||
script: | | |||
core.setFailed('${{ steps.get-chart.outputs.error }}') | |||
- id: push-tag |
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.
Not sure if this is the best place to push the tag, at this point the chart is not yet published and the repository is not updated with the new version. We can reach a situation where the tag is created and the chart is not published. We could leave this job as read-only and create a new job depending on the update-index
to push the tag if everything went well.
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.
AFAIK, several in several repositories release jobs get triggered when a tag is set, right?
Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
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.
Great!!! Thanks a lot @javsalgar!
* [bitnami/*] chore: 👷 Add tag and changelog support Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * perf: ⚡ Avoid fetching the index branch Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * chore: 🔧 Do not scan CHANGELOG.md files Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * chore: 🙈 Update .helmignore files Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * refactor: ♻️ Separate push-tag section Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> --------- Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> Signed-off-by: Fran Mulero <fmulero@vmware.com>
Thank you for this change @javsalgar! It's much easier to see what's changed. |
LITERAL GAME CHANGER! Renovetebot MR's are a million times better to review for us as well. KUDOS |
Signed-off-by: Javier Salmeron Garcia jsalmeron@vmware.com
Description of the change
This PR improves the traceability of bitnami/charts changes by performing the following changes in our GitHub workflows:
ci-pipeline.yaml
: We extend the "Update README and CRDs" job also to generate a CHANGELOG.md file using conventional-changelogs-cli. Normally, CHANGELOG.md files are updated in a separate commit of the kind "cut release x.y.z", where a tag is created as well. However, due to the nature of our repository, changing it in a subsequent commit would imply doubling the number of commits in the repo, which would have high-performance penalties down the line. In this example we see what the CHANGELOG.md would look like.cd-pipeline.yaml
: If there is a chart change, it will tag the commit with the following format:APP/VERSION
. This is a sample tag: https://github.com/bitnami/charts/releases/tag/spark%2F9.0.4Benefits
Possible drawbacks
Applicable issues
Checklist
Chart.yaml
according to semver. This is not necessary when the changes only affect README.md files.README.md
using readme-generator-for-helm