A Drone Plugin to turn a GitHub project into a self-hosted Helm chart repo, using helm/chart-releaser CLI tool.
This plugin is based and inspired by the chart-releaser-action.
kind: pipeline
name: default
steps:
- name: publish
image: otwld/drone-chart-releaser-github-pages
settings:
cr_token:
from_secret: github_access_token
skip_existing: true
- One of these confuguration
- A GitHub repo containing a single chart in root directory (Chart.yaml)
- A directory with your Helm charts (default is a folder named
/charts
, if you want to maintain your charts in a different directory, you must include asettings.charts_dir
input in the plugin settings).
- GitHub branch called
gh-pages
to store the published charts. - In your repo, go to Settings/Pages. Change the
Source
Branch
togh-pages
. - Create a
.drone.yml
file in your root directory. Pipelines examples are available below. For more information, reference the Drone CI Help Documentation for Pipeline Overview
Setting properties | type | default | required | description |
---|---|---|---|---|
version |
string | v1.6.1 |
optional | The chart-releaser version to use |
config |
string | |
optional | Config file for chart-releaser. For more information on the config file, see the documentation |
chart_dir |
string | charts |
required in case of non root single chart repository | The charts directory |
owner |
string | $DRONE_REPO_OWNER | optional | The owner's name repository used for chart-releaser |
repo |
string | $DRONE_REPO_NAME | optional | The repository name used for chart-releaser |
skip_packaging |
boolean | false | optional | Skip the packaging step. This allows you to do more advanced packaging of your charts (for example, with the helm package command) before this action runs. This action will only handle the indexing and publishing steps. |
skip_existing |
boolean | false | optional | Skip package upload if release/tag already exists |
skip_upload |
boolean | false | optional | Skip the upload step. This allows you to do more advanced uploading of your charts (for exemple with OCI based repositories) which doen't require the index.yaml . |
mark_as_latest |
boolean | true | optional | When you set this to false , it will mark the created GitHub release not as 'latest'. |
packages_with_index |
boolean | false | optional | When you set this to true , it will upload chart packages directly into publishing branch. |
pages_branch |
string | gh-pages |
optional | Name of the branch to be used to push the index and artifacts. (default to: gh-pages but it is not set in the action it is a default value for the chart-releaser binary) |
cr_token |
string | |
required | The GitHub token of this repository |
root_package |
boolean | false | required in case of root single chart repository | In case single chart chart in root repository, set it to true |
install_only |
boolean | false | used for CI | This is used for the CI. |
install_dir |
string | /var/tmp |
used for CI | This is used for the CI. |
changed_charts.txt
: A comma-separated list of charts that were released on this run. Will be an empty string if no updates were detected, will be unset ifsettings.skip_packaging
is used: in the latter case your custom packaging step is responsible for setting its own outputs if you need them.chart_version.txt
: The version of the most recently generated charts; will be set even if no charts have been updated since the last run.
kind: pipeline
name: default
steps:
- name: publish
image: otwld/drone-chart-releaser-github-pages
settings:
cr_token:
from_secret: github_access_token
skip_existing: true
charts_dir: 'charts' # Specify the charts directory
kind: pipeline
name: default
steps:
- name: publish
image: otwld/drone-chart-releaser-github-pages
settings:
cr_token:
from_secret: github_access_token
skip_existing: true
root_package: true # Specify single chart repository
For options see config-file.
- For questions, suggestions, and discussion about the Helm Chart Releaser please refer to the Chart Releaser issue page
- For questions, suggestions, and discussion about this plugin please visite Drone Chart Releaser Github issue page