From 43fc14e59f83909c6604a00231d28a9b90edcb93 Mon Sep 17 00:00:00 2001 From: Til Blechschmidt Date: Wed, 11 Aug 2021 11:55:38 +0200 Subject: [PATCH] Allow multiple charts to be packaged --- mkdocs_helm/repository.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mkdocs_helm/repository.py b/mkdocs_helm/repository.py index 1a4235d..4eba511 100644 --- a/mkdocs_helm/repository.py +++ b/mkdocs_helm/repository.py @@ -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( @@ -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):