├── LICENSE.txt ├── README.md ├── github.sh └── plugin.yaml /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Helm GitHub Plugin 2 | Copyright (C) 2016, Matt Butcher 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Helm Github Plugin 2 | 3 | GitHub and GitHub Pages integration with Helm. 4 | 5 | This provides tools for working with GitHub. Mainly, it is for using 6 | GitHub Pages as a chart repository by storing charts in the 'docs/' directory 7 | of the current project. 8 | 9 | GitHub pages provide a "website" for your GtHub project. We can use GitHub pages 10 | serve Helm charts. For an exaple, see the https://github.com/technosophos/tscharts 11 | 12 | Available Commands: 13 | 14 | - push Push a chart (repository) to GitHub pages. 15 | 16 | ## Installation 17 | 18 | ```console 19 | $ helm plugin install https://github.com/technosophos/helm-github 20 | ``` 21 | -------------------------------------------------------------------------------- /github.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | usage() { 6 | cat << EOF 7 | GitHub and GitHub Pages integration with Helm. 8 | 9 | This provides tools for working with GitHub. Mainly, it is for using 10 | GitHub Pages as a chart repository by storing charts in the 'docs/' directory 11 | of the current project. 12 | 13 | Available Commands: 14 | push Push a chart (repository) to GitHub pages. 15 | 16 | EOF 17 | } 18 | 19 | push() { 20 | echo "Packaging $1" 21 | cp "${1}" "./docs/${1}" 22 | if [ -e ${1}.prov ]; then 23 | cp "${1}.prov" "./docs/${1}.prov" 24 | fi 25 | helm repo index ./docs 26 | git add docs/$1 ./docs/index.yaml 27 | git commit -m "Auto-commit $1" 28 | git push origin master 29 | echo "Successfully pushed $1 to GitHub" 30 | } 31 | 32 | if [[ $# < 2 ]]; then 33 | usage 34 | exit 1 35 | fi 36 | 37 | case "${1:-"help"}" in 38 | "push") 39 | push $2 40 | ;; 41 | "help") 42 | usage 43 | ;; 44 | *) 45 | usage 46 | exit 1 47 | ;; 48 | esac 49 | -------------------------------------------------------------------------------- /plugin.yaml: -------------------------------------------------------------------------------- 1 | name: "github" 2 | version: "0.1.0" 3 | usage: "Provide GitHub and GitHub Pages support to Helm" 4 | description: |- 5 | This plugin provides GitHub services to Helm. 6 | command: "$HELM_PLUGIN_DIR/github.sh" 7 | --------------------------------------------------------------------------------