Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ejhayes committed Jun 23, 2023
0 parents commit 9b620d7
Show file tree
Hide file tree
Showing 29 changed files with 17,032 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"root": true
}
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
Empty file added .github/workflows/test.yml
Empty file.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
dist
publish
charts/*/README.md
charts/*/charts
Chart.lock
*.tgz
.DS_Store
node_modules
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test-e2e/charts/**/*.yaml
test-e2e/charts/**/*.yml
test-e2e/charts/**/*.tpl
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# auto-plugin-helm-chartmuseum

Auto plugin for helm charts! This plugin can do the following:

- Sets helm package version to auto version
- Updates local dependencies to auto version (if version specified is `0.0.0-local` or the value specified in the `replaceVersionString` param)
- Replaces `file://....` with `repository` value if `replaceFileWithRepository` is set to `true`
- Updates documentation using `helm-docs` if `useHelmDocs` is set to `true`
- Pushes packages to chartmuseum (using `cm-push` plugin) if `push` is set to `true`

## quickstart

This plugin has the following dependencies:

- [`helm`](https://github.com/helm/helm): required
- [`helm-docs`](https://github.com/norwoodj/helm-docs): required if `HELM_PLUGIN_USE_HELM_DOCS` is set to `true`
- [`cm-push`](https://github.com/chartmuseum/helm-push): required if `HELM_PLUGIN_ENABLE_PUSH` is set to `true`

To use in your projects, add this to you `.autorc` file under `plugins` section:

```
{
"plugins": [
["auto-plugin-helm", {
"enableCanary": true,
"enablePrelreases": true,
"recursive": true,
"useHelmDocs": true,
"enablePush": true,
"forcePush": true,
"repository": "@myRepoAlias",
"publishRepository": "myRepoAlias"
}]
]
}
```

## configuration

| setting | description | environment variable | default |
| --------------------------- | -------------------------------------------------------------- | ------------------------------------------ | ------------- |
| `path` | Path to charts | `HELM_PLUGIN_PATH` | `.` |
| `recursive` | Search for all charts in `path` | `HELM_PLUGIN_RECURSIVE` | `false` |
| `forcePush` | Force push chart versions | `HELM_PLUGIN_FORCE_PUSH` | `false` |
| `push` | Push charts to repository | `HELM_PLUGIN_PUSH` | `false` |
| `enableCanary` | Enable canary builds | `HELM_PLUGIN_ENABLE_CANARY` | `false` |
| `enablePrereleases` | Enable prelrease builds | `HELM_PLUGIN_ENABLE_PRERELEASE` | `false` |
| `replaceVersionString` | Replace version placeholder with current version | `HELM_PLUGIN_REPLACE_VERSION_STRING` | `true` |
| `replaceFileWithRepository` | Replace local file references with remote repository reference | `HELM_PLUGIN_REPLACE_FILE_WITH_REPOSITORY` | `false` |
| `repository` | Repository to replace file references with | `HELM_PLUGIN_REPOSITORY` | `''` |
| `versionString` | Default version string to replace | `HELM_PLUGIN_VERSION_STRING` | `0.0.0-local` |
| `useHelmDocs` | Use `helm-docs` to update `README.md` | `HELM_PLUGIN_USE_HELM_DOCS` | `false` |
| `publishPath` | Local path to use for packaged charts | `HELM_PLUGIN_PUBLISH_PATH` | `publish` |
| `publishRepository` | Repository to publish to | `HELM_PLUGIN_PUBLISH_REPOSITORY` | `publish` |

If you are pushing to chart museum (set `push` or `HELM_PLUGIN_PUSH` to `true`) you can also set auth with these environment variables (additional environment variables can be found in the [docs](https://github.com/norwoodj/helm-docs)):

- `HELM_REPO_USERNAME`
- `HELM_REPO_PASSWORD`
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "3"

services:
chartmuseum:
image: ghcr.io/helm/chartmuseum:v0.16.0
ports:
- "8080:8080"
environment:
DEBUG: 1
STORAGE: "local"
STORAGE_LOCAL_ROOTDIR: "/tmp/charts"
#volumes:
# - './charts:/charts'
Empty file added environments/local.env
Empty file.
Empty file added environments/test.env
Empty file.
Loading

0 comments on commit 9b620d7

Please sign in to comment.