0.1.4 • Published 6 months ago

auto-plugin-helm-chartmuseum v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

auto-plugin-helm-chartmuseum

npm version Maintainability Test Coverage FOSSA Status All Contributors

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: required
  • helm-docs: required if HELM_PLUGIN_USE_HELM_DOCS is set to true
  • cm-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"
    }]
  ]
}

github actions

You can use this with GitHub actions as follows:

- name: Setup Helm
  uses: azure/setup-helm@v3
- name: Setup helm-docs
  run: |
    wget https://github.com/norwoodj/helm-docs/releases/download/v1.11.0/helm-docs_1.11.0_Linux_x86_64.deb
    sudo dpkg -i helm-docs_1.11.0_Linux_x86_64.deb
    rm helm-docs_1.11.0_Linux_x86_64.deb
- name: Setup Helm Push Plugin
  run: helm plugin install https://github.com/chartmuseum/helm-push
- name: Add Chartmuseum repo
  run: helm repo add local $CHARTMUSEUM_BASE_URL
- env:
    HELM_PLUGIN_ENABLE_CANARY: true
    HELM_PLUGIN_PUSH: true
    HELM_PLUGIN_REPOSITORY: '@local'
    HELM_PLUGIN_PUBLISH_REPOSITORY: local
    GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  run: npx auto shipit

configuration

settingdescriptionenvironment variabledefault
pathPath to chartsHELM_PLUGIN_PATH.
recursiveSearch for all charts in pathHELM_PLUGIN_RECURSIVEfalse
forcePushForce push chart versionsHELM_PLUGIN_FORCE_PUSHfalse
pushPush charts to repositoryHELM_PLUGIN_PUSHfalse
enableCanaryEnable canary buildsHELM_PLUGIN_ENABLE_CANARYfalse
enablePrereleasesEnable prelrease buildsHELM_PLUGIN_ENABLE_PRERELEASEfalse
replaceVersionStringReplace version placeholder with current versionHELM_PLUGIN_REPLACE_VERSION_STRINGtrue
replaceFileWithRepositoryReplace local file references with remote repository referenceHELM_PLUGIN_REPLACE_FILE_WITH_REPOSITORYfalse
repositoryRepository to replace file references withHELM_PLUGIN_REPOSITORY''
versionStringDefault version string to replaceHELM_PLUGIN_VERSION_STRING0.0.0-local
useHelmDocsUse helm-docs to update README.mdHELM_PLUGIN_USE_HELM_DOCSfalse
publishPathLocal path to use for packaged chartsHELM_PLUGIN_PUBLISH_PATHpublish
publishRepositoryRepository to publish toHELM_PLUGIN_PUBLISH_REPOSITORYpublish

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):

  • HELM_REPO_USERNAME
  • HELM_REPO_PASSWORD

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

0.1.4

6 months ago

0.1.4-next.1

6 months ago

0.1.4-next.0

7 months ago

0.1.3

10 months ago

0.1.3-next.2

10 months ago

0.1.3-next.1

10 months ago

0.1.3-next.0

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago