Skip to content

Commit

Permalink
feat: add option to add helm cm-push args (nflaig#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuschillernordlb committed May 11, 2023
1 parent 05a8442 commit 755e44b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ appVersion 1.16.0

### Plugin Config

| Parameter | Type | Default | Required | Description |
| ------------------- | --------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
| `chartPath` | `string` | `""` | `true` | Chart directory, where the _Chart.yaml_ is located. |
| `registry` | `string` | `""` | `false` | URI of a container registry. |
| `onlyUpdateVersion` | `boolean` | `false` | `false` | Don't change `appVersion` if this is true. Useful if your chart is in a different git repo than the application. |
| `crPublish` | `boolean` | `false` | `false` | Enable chart-releaser publishing. |
| `crConfigPath` | `string` | `""` | `false` | Path to .ct.yaml chart-releaser configuration file. |
| `isChartMuseum` | `boolean` | `false` | `false` | Enable ChartMuseum publishing. |
| `populateChangelog` | `boolean` | `false` | `false` | Populate `artifacthub.io/changes` annotations with notes produced by `@semantic-release/release-notes-generator` compatible plugins. |
| `packageArgs` | `string` | `""` | `false` | Additional parameters for the helm package command, e.g. `--key mykey --keyring ~/.gnupg/secring.gpg` |
| Parameter | Type | Default | Required | Description |
|---------------------| --------- | ------- | -------- |---------------------------------------------------------------------------------------------------------------------------------------|
| `chartPath` | `string` | `""` | `true` | Chart directory, where the _Chart.yaml_ is located. |
| `registry` | `string` | `""` | `false` | URI of a container registry. |
| `onlyUpdateVersion` | `boolean` | `false` | `false` | Don't change `appVersion` if this is true. Useful if your chart is in a different git repo than the application. |
| `crPublish` | `boolean` | `false` | `false` | Enable chart-releaser publishing. |
| `crConfigPath` | `string` | `""` | `false` | Path to .ct.yaml chart-releaser configuration file. |
| `isChartMuseum` | `boolean` | `false` | `false` | Enable ChartMuseum publishing. |
| `populateChangelog` | `boolean` | `false` | `false` | Populate `artifacthub.io/changes` annotations with notes produced by `@semantic-release/release-notes-generator` compatible plugins. |
| `packageArgs` | `string` | `""` | `false` | Additional parameters for the helm package command, e.g. `--key mykey --keyring ~/.gnupg/secring.gpg` |
| `cmPushArgs` | `string` | `""` | `false` | Additional parameters for the helm cm-push command (only relevant if `isChartMuseum` is set to true) e.g. `--context-path /repo/path` |

### Environment Variables

Expand Down
4 changes: 2 additions & 2 deletions lib/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ module.exports = async (pluginConfig, context) => {
}
};

async function publishChartToChartMuseum({chartPath}) {
async function publishChartToChartMuseum({chartPath, cmPushArgs}) {
await execa(
'helm',
['cm-push', chartPath, 'semantic-release-helm']
['cm-push', chartPath, ...parseExtraArgs(cmPushArgs), 'semantic-release-helm']
);
await execa(
'helm',
Expand Down

0 comments on commit 755e44b

Please sign in to comment.