npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@liatrio/semantic-release-helm

v3.0.0

Published

semantic-release plugin for publishing helm charts

Downloads

7

Readme

semantic-release-helm

A semantic-release plugin for publishing Helm charts using GitHub Pages or Amazon S3.

| Step | Description | |--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | verifyConditions | Verifies that Helm is installed and all specified charts pass helm lint. Additional checks are performed depending on whether you are publishing to GitHub Pages or Amazon S3. | | prepare | Updates the version and appVersion within each chart's chart.yaml, packages each chart, and updates the chart repository index.yaml file. | | publish | Publishes the updated chart repository index.yaml file to GitHub Pages / Amazon S3. When using S3, this step also uploads each chart tarball to the S3 Bucket. | | success | Cleans up the temporary directory used within prepare and published (same as fail). | | fail | Cleans up the temporary directory used within prepare and published (same as success). |

Install

$ npm install @liatrio/semantic-release-helm -D
$ yarn add @liatrio/semantic-release-helm -D

Usage

The plugin can be configured in the semantic-release configuration file:

The examples below will cover a basic configuration of a Node.js based application that has its own Helm chart located within the charts/my-app directory. Every commit to the main branch will run npx semantic-release.

Example (GitHub Pages)

branches:
  - main
preset: conventionalcommits
plugins:
  - '@semantic-release/commit-analyzer'
  - '@semantic-release/release-notes-generator'
  - '@semantic-release/npm'                     # in the case of a Node.js app, automatically update the `version` field within `package.json`
  - path: '@liatrio/semantic-release-helm'
    github:
      pagesBranch: gh-pages
    charts:
      - charts/my-app                           # assuming your repository has a `charts` folder with a single chart called `my-app`
  - path: '@semantic-release/git'
    assets:                                     # both of these changes should be committed back to the main branch
      - package.json                            # this is modified by the npm plugin, remove this if you aren't using the npm plugin
      - charts/my-app/Chart.yaml                # this is modified during the `prepare` step of the helm plugin 
  - path: '@semantic-release/github'
    failComment: false
    successComment: false
    assets:
      - path: 'my-app-*.tgz'                    # this tarball is created via `helm package` during the `prepare` step of the helm plugin. this must be uploaded to GitHub as a release asset
        label: Helm Chart

This configuration will perform the following steps:

  • Compute the next release version via conventional commits.
  • Update the version field within the package.json file to the next release version.
  • Update the version and appVersion fields within the charts/my-app/Chart.yaml to the next release version.
  • Commit the aforementioned changes and push them to the main branch. This commit will also be tagged with the next release version, and that tag will also be pushed.
  • Create a GitHub release that contains the Helm chart tarball that was created via helm package.
  • Update the index.yaml file within the GitHub Pages deployment to reference the new chart version.

Example (Amazon S3)

branches:
  - main
preset: conventionalcommits
plugins:
  - '@semantic-release/commit-analyzer'
  - '@semantic-release/release-notes-generator'
  - '@semantic-release/npm'                                       # in the case of a Node.js app, automatically update the `version` field within `package.json`
  - path: '@liatrio/semantic-release-helm'
    aws:
      region: us-east-1
      bucket: my-s3-bucket
      bucketUrl: https://my-s3-bucket.s3.us-east-1.amazonaws.com  # if your s3 bucket is sitting behind AWS CloudFront, this can be updated to use that URL instead
    charts:
      - charts/my-app                                             # assuming your repository has a `charts` folder with a single chart called `my-app`
  - path: '@semantic-release/git'
    assets:                                                       # both of these changes should be committed back to the main branch
      - package.json                                              # this is modified by the npm plugin, remove this if you aren't using the npm plugin
      - charts/my-app/Chart.yaml                                  # this is modified during the `prepare` step of the helm plugin 
  - path: '@semantic-release/github'
    failComment: false
    successComment: false

This configuration will perform the following steps:

  • Compute the next release version via conventional commits.
  • Update the version field within the package.json file to the next release version.
  • Update the version and appVersion fields within the charts/my-app/Chart.yaml to the next release version.
  • Commit the aforementioned changes and push them to the main branch. This commit will also be tagged with the next release version, and that tag will also be pushed.
  • Create a GitHub release using the semantic-release-github plugin.
  • Update the index.yaml file within the Amazon S3 bucket to reference the new chart version.
  • Upload the chart tarball that was created during prepare via helm package to S3.

Configuration

When using GitHub Pages, The GitHub repository this plugin runs against must have GitHub Pages enabled, and the branch used for GitHub Pages must exist. Also, the Git user associated with the configured Git credentials has to be able to directly push commits to the GitHub Pages branch.

When using Amazon S3, the environment that runs semantic-release must be configured with valid AWS Authentication. For example, if you are running semantic-release within GitHub Actions, you might use the configure-aws-credentials action. Also, the S3 bucket defined in the aws.bucket configuration option must exist, and the user/role associated with the AWS credentials must have access to it.

Environment variables

| Variable | Description | Required | |----------------|----------------------------------------------------------------------------------------|----------| | GITHUB_TOKEN | A personal access token used to call the GitHub API during the verifyConditions step | yes |

Options

Either github or aws configuration options must be specified.

| Option | Description | |----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | charts | A list of paths to each Helm chart to publish. Paths are relative to the root of the repository. | | github.pagesBranch | The branch that GitHub Pages is using. | | aws.region | The AWS region to use. | | aws.bucket | The name of the S3 bucket to use. | | aws.bucketUrl | The URL of the bucket. This can follow the format of https://${bucketName}.s3.${region}.amazonaws.com. Alternatively, you can use a service like AWS CloudFront to expose the bucket, and put that URL here instead. |