Skip to content

Commit

Permalink
Chart version bump: update READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorik van der Werf committed May 13, 2020
1 parent 6b6289d commit 249004b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 6 deletions.
17 changes: 16 additions & 1 deletion .github/actions/chart-version-bumper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,22 @@ Chart version bumper is a Github Action that increases the Chart & App version o

### `chart_name`

**Required** The name of the chart.
**Required** The name of the chart, in the `<repo_root>/charts/` directory

### `chart_version`

**Required** The (new) version of the chart.

### `app_version`

**Required** The (new) version of the app that the Helm chart contains

## Outputs

### `verboseChangeString`

The changes that were made, in a human readable string, usable for pull request or slack messages

### `changeString`

The changes that were made, in a single line, usable for PR titles or commit messages
6 changes: 3 additions & 3 deletions .github/actions/chart-version-bumper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ inputs:
description: 'Name of the chart'
required: true
chart_version:
description: 'The new version of the Helm chart'
description: 'The (new) version of the Helm chart'
required: true
app_version:
description: 'The new version of the app'
description: 'The (new) appVersion'
required: true
outputs:
changeString:
description: 'The changes summed up in a short message, meant for commits and PR titles'
verboseChangeString:
description: 'The changes summed up in a verbose way, meant for PR messages'
description: 'The changes summed up in a verbose way, meant for PR or Slack messages'
runs:
using: 'node12'
main: 'index.js'
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,25 @@ Please view [our contributing docs](CONTRIBUTING.md) for more information.
[newrelic-logs]: https://docs.newrelic.com/docs/logs/enable-logs/enable-logs/kubernetes-plugin-logs
[ksm]: https://github.com/kubernetes/kube-state-metrics
[installing-helm]: https://helm.sh/docs/intro/install/

### Automated version bumps

This repository is configured to accept webhook requests to automatically bump chart versions. If it receives a version bump request, a Github Action will prepare a pull request that contains the requested changes. The PR has to be manually merged after this.

#### Trigger an automated version bump

A repo scoped [GitHub Personal Access Token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) is required.

If you have the Personal Access token, execute the following HTTP POST request:

```
curl -H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token <PERSONAL_ACCESS_TOKEN>" \
--request POST \
--data '{"event_type": "bump-chart-version", "client_payload": { "chart_name": "simple-nginx", "chart_version": "1.2.3", "app_version": "1.45.7"}}' \
https://api.github.com/repos/newrelic-experimental/helm-charts/dispatches
```

Notice the `client_payload` object inside the request body. This specific request will prepare a PR for the `simple-nginx` chart, to update the `app_version` to `1.45.7`, and `chart_version` to `1.2.3`.

You can configure the client_payload accordingly.
4 changes: 2 additions & 2 deletions charts/simple-nginx/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 1.1.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 1.18
appVersion: "1.1"

0 comments on commit 249004b

Please sign in to comment.