Coder Social home page Coder Social logo

ejhayes / auto-plugin-helm-chartmuseum Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 2.0 659 KB

Auto plugin for helm

Home Page: https://www.npmjs.com/package/auto-plugin-helm-chartmuseum

License: MIT License

TypeScript 88.71% Mustache 7.59% Smarty 3.17% JavaScript 0.54%
auto-release chartmuseum helm helm-deployment helm-docs publishing release releases

auto-plugin-helm-chartmuseum's Introduction

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

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

  • HELM_REPO_USERNAME
  • HELM_REPO_PASSWORD

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Eric Hayes

๐Ÿ“– ๐Ÿš‡ โš ๏ธ ๐Ÿ’ป

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

auto-plugin-helm-chartmuseum's People

Contributors

dependabot[bot] avatar ejhayes avatar rfun avatar

Watchers

 avatar  avatar

Forkers

fossabot rfun

auto-plugin-helm-chartmuseum's Issues

Improve documentation around usage and examples

Update documentation to show how to show complete working example:

  • Explain default version label token (0.0.0-local)
  • file:// replacement with repository (and how to set this in helm)
  • Chart grouping (this plugin updates all semantic versions)

Add Tests for ReadDir

Need to add tests around the getChartDirs method to ensure that readDir is behaving as expected, even in recursive scenarios.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.