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

Set up CD to release to GitHub Pages #41

Merged
merged 10 commits into from
May 4, 2021
Merged

Set up CD to release to GitHub Pages #41

merged 10 commits into from
May 4, 2021

Conversation

florisvdg
Copy link
Member

This PR adds a CD pipeline for the Helm chart and also transitions the Helm repo model to use GitHub Pages.

Impact of this transition on the Git repo and on the Helm repo:

New Helm repo url

  • Old: https://raw.githubusercontent.com/1Password/connect-helm-charts/main
  • New: https://1password.github.io/connect-helm-charts

No more generated files / artifacts in source control

With the new model, we can remove the .tgz files and the index.yaml file. For backwards compatibility, I didn't remove the index.yaml file just yet (which I will in a future PR). Instead, I've changed the tar urls it points to, so that old repo url still works without the tars in source control anymore.

GitHub Pages setup

Here's how this works: there's now a persistent branch called gh-pages, whose file tree gets served by GitHub Pages. It only has an index.yaml file (served at https://1password.github.io/connect-helm-charts/index.yaml), because that's all Helm needs. The index file points to tars stored as GitHub Release assets. For backwards compatibility, I've manually uploaded the existing tars to the corresponding GitHub Release.

New release process and tagging model

To do the release, we're using the official Helm chart-releaser CLI and accompanying action. This will keep an eye on main for new chart versions (i.e. different version in Chart.yaml compared to the previous chart tag) and automatically create a new tag+release on GitHub with the tar. Then, it updates the index.yaml file on the gh-pages branch.

image

Using the chart-releaser tooling does impose some differences to the way we've done things before, noticeably:

  • Releases/tags are now done 'per chart' instead of for the entire repo, so they'll be composed of both the chart name and the version: <chart name>-<chart version>. Here's an example of how that will look (this was done on a fork):

image

  • The charts have to be in a subdirectory, so I had to move connect/ to charts/connect/
  • With the release automated, we can delete the scripts to do a local release. Open point of discussion is still what to do with the changelog.

@florisvdg florisvdg linked an issue May 3, 2021 that may be closed by this pull request
thatguygriff
thatguygriff previously approved these changes May 3, 2021
To avoid unwanted release attempts. More background in the upstream PR: helm/chart-releaser-action#80
@florisvdg
Copy link
Member Author

florisvdg commented May 3, 2021

We should wait with merging this until the next release is prepped, because otherwise it'll try to re-release v1.1.0. So converting to a draft for now to avoid an accidental merge.

@florisvdg florisvdg marked this pull request as draft May 3, 2021 16:00
@florisvdg florisvdg marked this pull request as ready for review May 4, 2021 11:54
@florisvdg
Copy link
Member Author

I've disabled the automatic workflow trigger, so we can already merge this.

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.

consider using github pages instead of tgz in the repo
2 participants