Giter Site home page Giter Site logo

semantic-release-helm's Introduction

semantic-release-helm

This is a plugin for semantic-release. It updates version and appVersion of a Helm chart's Chart.yaml.

The version is increased according to nextRelease.type, which can be one of

  • major
  • premajor
  • minor
  • preminor
  • patch
  • prepatch
  • prerelease

or null if it's not valid.

The appVersion is set to nextRelease.version if onlyUpdateVersionis false or unset.

BREAKING CHANGE in v2

path has been renamed to chartPath to prevent config conflicts.

Examples:
version 0.1.0  
appVersion 1.16.0
  1. patch (1.16.0 -> 1.16.1)
    New chart version is 0.1.1

  2. minor (1.16.0 -> 1.17.0)
    New chart version is 0.2.0

  3. major (1.16.0 -> 2.0.0)
    New chart version is 1.0.0

Configuration

  • chartPath (required) - string Chart directory, where the Chart.yaml is located.

  • registry (optional) - string
    URI of a container registry.

  • onlyUpdateVersion (optional) - boolean (default: false)
    Don't change appVersion if this is true. Useful if your chart is in a different git repo than the application.

Pass credentials through environment variables accordingly:

export REGISTRY_USERNAME=<USERNAME>
export REGISTRY_PASSWORD=<PASSWORD>

For S3 pass the AWS credentials as environment variables:

export AWS_REGION=<REGION>
export AWS_ACCESS_KEY_ID=<ACCESS_KEY_ID>
export AWS_SECRET_ACCESS_KEY=<SECRET_ACCESS_KEY>

Example

This will update version and appVersion in ./chart/Chart.yaml and push the chart to localhost:5000/repo/chart. The image will be tagged with the value of version from Chart.yaml.

{
  "plugins": [
    [
      "semantic-release-helm",
      {
        chartPath: './chart',
        registry: 'localhost:5000/repo/chart'
      }
    ]
  ]
}

S3 Example

The helm-s3 plugin adds support for S3. Check the documentation for additional options

This will update version in ./chart/Chart.yaml and push the chart to s3://my-s3-bucket/s3-prefix. The image will be tagged with the value of version from Chart.yaml.

{
  "plugins": [
    [
      "semantic-release-helm",
      {
        chartPath: './chart',
        registry: 's3://my-s3-bucket-repo/s3-prefix',
        onlyUpdateVersion: true,
      }
    ]
  ]
}

semantic-release-helm's People

Contributors

alexanderbabel avatar m1pl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.