Skip to content

Latest commit

 

History

History
96 lines (63 loc) · 2.62 KB

README.tmpl.md

File metadata and controls

96 lines (63 loc) · 2.62 KB

helm-changelog

Build Status Go Report Card

Create changelogs for Helm Charts, based on git history.

The application depends on the assumption that the helm chart is released on the first commit where the version number is bumped in the Chart.yaml file.

All sub-sequent commits are grouped as commits for the next release, until the version number is bumped again.

Features

The changelog contains the following things:

  • Commits are grouped by releases
  • Each release displays
    • Supported Helm version
    • Release date
    • App Version for the chart
    • Supported Kubernetes version
  • Changes in default helm values

Examples

This repository contains a set of example changelogs created for the github.com/prometheus-community/helm-charts charts.

Installation

All relevant commands are added to the Makefile

$ make help
{{ .Env.MAKE_HELPTEXT }}

Run Standalone

First build the standalone binary:

$ make build
go build -o ./bin/helm-changelog .

This results in a binary in ./bin/helm-changelog.

# See all cli options
$ ./bin/helm-changelog --help
{{ .Env.HELM_CHANGELOG_HELPTEXT }}

# Run helm-changelog creator with default params
$ ./bin/helm-changelog

Run in Docker

The helm-changelog can alternatively be run in docker.

This is done in a multi-stage build, and does not require a working go development environment.

# Building the application and docker image
$ make image

# Run the resulting docker image
$ docker run -it --rm -v $(pwd):/data mogensen/helm-changelog:latest

The helm-changelog app is running as a non-root user. This is a security best-practice. If user 1000 does not have write access to the chart directory, you may need to run the container as an other user.

# Run docker image as current user
$ docker run --user $UID it --rm -v $(pwd):/data mogensen/helm-changelog:latest

Testing

Running Unit Tests

Unit tests are implemented with Go's standard test framework.

All tests are located in their own test-packages, enforcing that the tests only test the public interface of the go packages.

# Run unit tests and code coverage, including test for race conditions
$ make test-coverage