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

feat: create helm chart repository in gh-pages #1931

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

patrickleet
Copy link

@patrickleet patrickleet commented Nov 1, 2024

Fixes #1851 and fixes #1881

Also requested in #751, #914, #1525,

Proposed Changes

This publishes a gh-pages branch as a helm repo for the package.

You will need to go to repo settings and enable it (Settings -> Pages):

image

I cherry picked @kromanow94's commits from #1851 but they got squashed out. I modified that script, moved it to hack/, created a go template to render HTML from the index.yaml file, and added a github workflow that handles all of that.

It runs on every push to main but only commits to gh-pages if there are differences, which only happens when y'all release.

This allows users to use Helm chart via:

helm repo add knative-operator https://knative.github.io/operator
helm show values knative-operator/knative-operator

Release Note

NONE

Copy link

linux-foundation-easycla bot commented Nov 1, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: patrickleet / name: Patrick Lee Scott (99e0033)

@knative-prow knative-prow bot requested review from aliok and matzew November 1, 2024 17:27
Copy link

knative-prow bot commented Nov 1, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: patrickleet
Once this PR has been reviewed and has the lgtm label, please assign aliok for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

knative-prow bot commented Nov 1, 2024

Welcome @patrickleet! It looks like this is your first PR to knative/operator 🎉

Copy link

knative-prow bot commented Nov 1, 2024

Hi @patrickleet. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@knative-prow knative-prow bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 1, 2024
@patrickleet
Copy link
Author

example: https://patrickleet.github.io/knative-operator/

helm repo add patrickleet-knative-operator https://patrickleet.github.io/knative-operator
helm show values patrickleet-knative-operator/knative-operator

@patrickleet
Copy link
Author

patrickleet commented Nov 1, 2024

perhaps a better trigger than push to main could be used

maybe on tag published

on:
  push:
    tags:
    - *

but it wouldn't run until there was a new tag that way

@kromanow94
Copy link

Amazing!

try with helm index.yaml (@kromanow94)

find all helm chart releases and put to index.yaml (@kromanow94)

add chart description and version (@kromanow94)

add bash script for helm repo index.yaml generation from releases (@kromanow94)

script doesnt need token, rm unused python version, move to hack/, run from publish-helm gha workflow

push changes

remove unused py file

create clean branch for gh-pages

dont delete the script we need

typo

typo

gh-pages html

remove debug logs

git fetch

if statement wasnt working

copy needed files from hack to .tmp to use in empty gh-pages

debug

debug

cleanup debug logs

remove test file

fix: token not needed to install helm
@patrickleet
Copy link
Author

@houshengbo you still the person to tag to review this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publishing the helm chart to a repo Automatically create Helm index.yaml file for new release
2 participants