Skip to content

Commit

Permalink
Allow multiple charts to be packaged
Browse files Browse the repository at this point in the history
  • Loading branch information
TilBlechschmidt committed Aug 11, 2021
1 parent 8108e1b commit 43fc14e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mkdocs_helm/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

class HelmRepositoryPlugin(mkdocs.plugins.BasePlugin):
config_scheme = (
('chart', mkdocs.config.config_options.Type(
str, required=True)),
('charts', mkdocs.config.config_options.Type(
list, required=True)),
('chart_dir', mkdocs.config.config_options.Type(
str, default='charts')),
('helm_repo_url', mkdocs.config.config_options.Type(
Expand All @@ -29,11 +29,13 @@ def on_post_build(self, config):
helm_repo_url = self.config['helm_repo_url']
if not helm_repo_url:
helm_repo_url = self.get_github_pages_url(git_bin, remote_name)
chart = self.config['chart']
charts = self.config['charts']

self.build_chart_dir(
git_bin, remote_name, remote_branch, site_dir, chart_dir)
self.build_chart(helm_bin, site_dir, chart_dir, chart)
for chart in charts:
print("Building chart " + chart)
self.build_chart(helm_bin, site_dir, chart_dir, chart)
self.build_chart_index(helm_bin, site_dir, helm_repo_url)

def build_chart_dir(self, git_bin, remote_name, remote_branch, site_dir, chart_dir):
Expand Down

0 comments on commit 43fc14e

Please sign in to comment.