From 249004b9ecb34dd81bfcc8e109e07e4f65769fd3 Mon Sep 17 00:00:00 2001 From: Jorik van der Werf Date: Wed, 13 May 2020 16:25:14 +0200 Subject: [PATCH] Chart version bump: update READMEs --- .../actions/chart-version-bumper/README.md | 17 +++++++++++++- .../actions/chart-version-bumper/action.yml | 6 ++--- README.md | 22 +++++++++++++++++++ charts/simple-nginx/Chart.yaml | 4 ++-- 4 files changed, 43 insertions(+), 6 deletions(-) diff --git a/.github/actions/chart-version-bumper/README.md b/.github/actions/chart-version-bumper/README.md index 27adc5370..b1fb0ef8b 100644 --- a/.github/actions/chart-version-bumper/README.md +++ b/.github/actions/chart-version-bumper/README.md @@ -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 `/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 diff --git a/.github/actions/chart-version-bumper/action.yml b/.github/actions/chart-version-bumper/action.yml index bf35e1fd9..5f6c4d9be 100644 --- a/.github/actions/chart-version-bumper/action.yml +++ b/.github/actions/chart-version-bumper/action.yml @@ -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' \ No newline at end of file diff --git a/README.md b/README.md index d861cfa64..3d08ff03d 100644 --- a/README.md +++ b/README.md @@ -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 " \ + --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. \ No newline at end of file diff --git a/charts/simple-nginx/Chart.yaml b/charts/simple-nginx/Chart.yaml index a27f3f619..09a817a62 100644 --- a/charts/simple-nginx/Chart.yaml +++ b/charts/simple-nginx/Chart.yaml @@ -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"