Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Add release steps to serve Helm Charts Repository on Github Pages #183

Merged
merged 2 commits into from
Jan 25, 2021
Merged

Add release steps to serve Helm Charts Repository on Github Pages #183

merged 2 commits into from
Jan 25, 2021

Conversation

akozich
Copy link
Contributor

@akozich akozich commented Jan 18, 2021

Currently Helm Charts are attached to Github Release. It's enough to install chart as is.

In our case we had to extend it with our deployment specific resources. The most correct way was to make our own chart having kafka-lag-exporter as a dependency. But in order to specify a dependency chart must he stored in Helm Charts Repository.

In this PR I've added few steps to serve Helm Charts Repository on Github Pages as explained here https://helm.sh/docs/topics/chart_repository/.

Changes summary:

  1. store chart to a separate folder instead of project root
  2. Try to download existing charts index
  3. Use helm index providing existing index to build a new repository index
  4. Create github pages branch if it does not exist on github
  5. Fetch github pages branch into separate git worktree
  6. Copy new repository index to the new worktree
  7. Commit worktree
  8. Remove worktree

@lightbend-cla-validator

At least one pull request committer is not linked to a user. See https://help.github.com/en/articles/why-are-my-commits-linked-to-the-wrong-user#commits-are-not-linked-to-any-user

@lightbend-cla-validator

Hi @akozich,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

https://www.lightbend.com/contribute/cla

@akozich akozich closed this Jan 19, 2021
@akozich akozich reopened this Jan 19, 2021
@akozich akozich closed this Jan 19, 2021
@akozich akozich reopened this Jan 19, 2021
Copy link
Owner

@seglo seglo left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks. I'll test this out in a release later this week.

@seglo seglo merged commit fc44dba into seglo:master Jan 25, 2021
@seglo
Copy link
Owner

seglo commented Jan 30, 2021

Hey @akozich . I ran this as part of the 0.6.6 release, but it doesn't seem to add or push the chart repo artifacts in the gh-pages branch. I see a .helm-release-packages dir, but it's not tracked. How did you intend this to work? Maybe we can create a chart-repo dir in the gh-pages branch and commit changes to that?

@seglo
Copy link
Owner

seglo commented Jan 31, 2021

I'll study this more later. In the meantime I manually published the chart repo here: http://lightbend.github.io/kafka-lag-exporter/repo/index.yaml

@akozich
Copy link
Contributor Author

akozich commented Jan 31, 2021

Hey @seglo . .helm-release-packages directory is not supposed to be indexed. It consists intermediate results. My scripts had to create gh-pages branch where the only committed file will be index.yaml.

@akozich
Copy link
Contributor Author

akozich commented Jan 31, 2021

As I can see gh-pages branch was created but for some reason it has all files from master. That's strange.

@seglo
Copy link
Owner

seglo commented Jan 31, 2021

I created it manually when I didn't see it after the release.

@seglo
Copy link
Owner

seglo commented Jan 31, 2021

I'll play around with it before the next release. Was it intended for the repo index.yaml to be a the root of the project?

http://lightbend.github.io/kafka-lag-exporter/index.yaml

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants