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

Automate helm chart releases #514

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

cbgbt
Copy link
Contributor

@cbgbt cbgbt commented Aug 10, 2023

Issue number:
Closes #492

Description of changes:
Our current github workflow for publishing charts would create a GitHub release for each new chart, but what we want is for the Releases page to focus on the operator, and for new charts to be available in the helm repository to reflect those.

The eks-charts repo does something like this, so this commit uses a modified version of their workflow to automatically publish charts.

Testing done:

Limitations
We have to manage our external dependencies on Helm and Kubeconform in the Makefile. Ideally we move these dependencies to the Bottlerocket SDK.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@markusboehme
Copy link
Member

Will be cool to have this publishing step automatically triggered! 🪄 Happy to approve once it's clear whether the validation scripts are intentionally not exiting with a failure code.

scripts/install-toolchain.sh Outdated Show resolved Hide resolved
scripts/validate-chart-versions.sh Outdated Show resolved Hide resolved
scripts/validate-chart-versions.sh Outdated Show resolved Hide resolved
scripts/validate-chart-versions.sh Outdated Show resolved Hide resolved
scripts/validate-chart-versions.sh Outdated Show resolved Hide resolved
scripts/validate-charts.sh Show resolved Hide resolved
scripts/lint-charts.sh Show resolved Hide resolved
scripts/publish-charts.sh Outdated Show resolved Hide resolved
scripts/install-toolchain.sh Outdated Show resolved Hide resolved
@cbgbt
Copy link
Contributor Author

cbgbt commented Aug 11, 2023

Addressed feedback from @markusboehme. Thanks!

scripts/install-toolchain.sh Outdated Show resolved Hide resolved
scripts/publish-charts.sh Outdated Show resolved Hide resolved
scripts/install-toolchain.sh Outdated Show resolved Hide resolved
# the release before that (e.g. v1.2.3-rc3)
# * If the repository head has advanced from a release tag (e.g. v1.0-g0123abcd),
# select the release the current head is based on (e.g. v1.0)
if $(git describe HEAD --tags | grep -Eq "^v[0-9]+(\.[0-9]+)*(-[a-z0-9]+)?$"); then
Copy link
Member

Choose a reason for hiding this comment

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

This could also be done with [[ $() =~ ]] if you wanted, but both ways work.

@cbgbt
Copy link
Contributor Author

cbgbt commented Aug 11, 2023

I didn't see @jpculp's feedback yet, I'll work on that. The above modifies the publication step to use a pull request so that we can enable branch protection on the gh-pages branch.

Here's a sample PR: cbgbt#1

@cbgbt
Copy link
Contributor Author

cbgbt commented Aug 11, 2023

^ Responds to some feedback from @jpculp , and also fixes a few bugs I discovered while reading through the action runner logs.

Here's the most recent actions run:
https://github.com/cbgbt/bottlerocket-update-operator/actions/runs/5835899909

With this PR being created:
cbgbt#4

Copy link
Member

@markusboehme markusboehme left a comment

Choose a reason for hiding this comment

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

🛼

@cbgbt cbgbt merged commit afb8c60 into bottlerocket-os:develop Aug 14, 2023
2 checks passed
@cbgbt cbgbt deleted the automatic-helm-releases branch December 1, 2023 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate the chart release process
4 participants