Skip to content
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

Merged
merged 6 commits into from May 21, 2024

Conversation

javsalgar
Copy link
Contributor

@javsalgar javsalgar commented Apr 24, 2024

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.
## <small>6.2.3 (2024-05-21)</small>

* [bitnami/*] ci: :construction_worker: Add tag and changelog support (#25359) ([91c707c](https://github.com/bitnami/charts/commit/91c707c)), closes [#25359](https://github.com/bitnami/charts/issues/25359)
* [bitnami/argo-cd] Release 6.2.3 (#26100) ([881a692](https://github.com/bitnami/charts/commit/881a692)), closes [#26100](https://github.com/bitnami/charts/issues/26100)

## <small>6.2.2 (2024-05-13)</small>

* [bitnami/argo-cd] Release 6.2.2 updating components versions (#25749) ([9bc1029](https://github.com/bitnami/charts/commit/9bc1029)), closes [#25749](https://github.com/bitnami/charts/issues/25749)

Benefits

  • More traceability of the chart

Possible drawbacks

  • Performance impact on the update README GitHub action

Applicable issues

Checklist

  • Chart version bumped in Chart.yaml according to semver. This is not necessary when the changes only affect README.md files.
  • Variables are documented in the values.yaml and added to the README.md using readme-generator-for-helm
  • Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
  • All commits signed off and in agreement of Developer Certificate of Origin (DCO)

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
@bitnami-bot bitnami-bot added the verify Execute verification workflow for these changes label Apr 24, 2024
@javsalgar javsalgar requested a review from fmulero April 24, 2024 11:44
@javsalgar javsalgar removed the request for review from jotamartos April 24, 2024 11:44
@carrodher carrodher marked this pull request as draft April 24, 2024 11:59
Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
Copy link

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.

@github-actions github-actions bot added the stale 15 days without activity label May 15, 2024
@javsalgar javsalgar removed the stale 15 days without activity label May 15, 2024
@carrodher carrodher marked this pull request as ready for review May 16, 2024 12:23
Copy link
Member

@carrodher carrodher left a 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>
carrodher
carrodher previously approved these changes May 16, 2024
rafariossaa
rafariossaa previously approved these changes May 20, 2024
Copy link
Contributor

@rafariossaa rafariossaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@fmulero fmulero left a 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?

@@ -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 }}
Copy link
Collaborator

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.

permissions:
contents: read

Copy link
Contributor Author

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

@@ -59,6 +60,21 @@ jobs:
with:
script: |
core.setFailed('${{ steps.get-chart.outputs.error }}')
- id: push-tag
Copy link
Collaborator

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.

Copy link
Contributor Author

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>
@javsalgar javsalgar dismissed stale reviews from rafariossaa and carrodher via 9d7b2be May 21, 2024 08:18
Copy link
Collaborator

@fmulero fmulero left a 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!

@javsalgar javsalgar merged commit 91c707c into main May 21, 2024
8 of 9 checks passed
@javsalgar javsalgar deleted the ci/changelogs-and-tags branch May 21, 2024 08:24
fmulero pushed a commit to fmulero/charts that referenced this pull request May 22, 2024
* [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>
@lusu007
Copy link
Contributor

lusu007 commented May 25, 2024

Thank you for this change @javsalgar! It's much easier to see what's changed.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bitnami solved verify Execute verification workflow for these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide changelog for charts
7 participants