Skip to content

Commit 249004b

Browse files
author
Jorik van der Werf
committed
Chart version bump: update READMEs
1 parent 6b6289d commit 249004b

File tree

4 files changed

+43
-6
lines changed

4 files changed

+43
-6
lines changed

.github/actions/chart-version-bumper/README.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,22 @@ Chart version bumper is a Github Action that increases the Chart & App version o
66

77
### `chart_name`
88

9-
**Required** The name of the chart.
9+
**Required** The name of the chart, in the `<repo_root>/charts/` directory
10+
11+
### `chart_version`
12+
13+
**Required** The (new) version of the chart.
14+
15+
### `app_version`
16+
17+
**Required** The (new) version of the app that the Helm chart contains
1018

1119
## Outputs
1220

21+
### `verboseChangeString`
22+
23+
The changes that were made, in a human readable string, usable for pull request or slack messages
24+
25+
### `changeString`
26+
27+
The changes that were made, in a single line, usable for PR titles or commit messages

.github/actions/chart-version-bumper/action.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ inputs:
55
description: 'Name of the chart'
66
required: true
77
chart_version:
8-
description: 'The new version of the Helm chart'
8+
description: 'The (new) version of the Helm chart'
99
required: true
1010
app_version:
11-
description: 'The new version of the app'
11+
description: 'The (new) appVersion'
1212
required: true
1313
outputs:
1414
changeString:
1515
description: 'The changes summed up in a short message, meant for commits and PR titles'
1616
verboseChangeString:
17-
description: 'The changes summed up in a verbose way, meant for PR messages'
17+
description: 'The changes summed up in a verbose way, meant for PR or Slack messages'
1818
runs:
1919
using: 'node12'
2020
main: 'index.js'

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,25 @@ Please view [our contributing docs](CONTRIBUTING.md) for more information.
8888
[newrelic-logs]: https://docs.newrelic.com/docs/logs/enable-logs/enable-logs/kubernetes-plugin-logs
8989
[ksm]: https://github.com/kubernetes/kube-state-metrics
9090
[installing-helm]: https://helm.sh/docs/intro/install/
91+
92+
### Automated version bumps
93+
94+
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.
95+
96+
#### Trigger an automated version bump
97+
98+
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.
99+
100+
If you have the Personal Access token, execute the following HTTP POST request:
101+
102+
```
103+
curl -H "Accept: application/vnd.github.everest-preview+json" \
104+
-H "Authorization: token <PERSONAL_ACCESS_TOKEN>" \
105+
--request POST \
106+
--data '{"event_type": "bump-chart-version", "client_payload": { "chart_name": "simple-nginx", "chart_version": "1.2.3", "app_version": "1.45.7"}}' \
107+
https://api.github.com/repos/newrelic-experimental/helm-charts/dispatches
108+
```
109+
110+
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`.
111+
112+
You can configure the client_payload accordingly.

charts/simple-nginx/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ type: application
1919
# This is the chart version. This version number should be incremented each time you make changes
2020
# to the chart and its templates, including the app version.
2121
# Versions are expected to follow Semantic Versioning (https://semver.org/)
22-
version: 0.1.0
22+
version: 1.1.1
2323

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

0 commit comments

Comments
 (0)