diff --git a/.gitignore b/.gitignore index f289435b..a3c9bc63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,92 +1,8 @@ # Vim *.swp -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -.pytest* -nosetests.xml -coverage.xml -*,cover -.hypothesis/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# IPython Notebook -.ipynb_checkpoints - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# dotenv -.env - -# virtualenv -venv/ -ENV/ - -# Spyder project settings -.spyderproject - -# Rope project settings -.ropeproject +output +.vscode +.DS_Store +.idea +**/*.tgz diff --git a/charts/kubezero/Chart.yaml b/charts/kubezero/Chart.yaml index 54c9adc4..0d601d57 100644 --- a/charts/kubezero/Chart.yaml +++ b/charts/kubezero/Chart.yaml @@ -9,8 +9,9 @@ keywords: - gitops maintainers: - name: Quarky9 -dependencies: - - name: argo-cd - version: 2.2.12 - repository: https://argoproj.github.io/argo-helm - alias: argocd +# Once PR is merged +#dependencies: +# - name: argo-cd +# version: 2.2.12 +# repository: https://argoproj.github.io/argo-helm +# alias: argocd diff --git a/scripts/publish.sh b/scripts/publish.sh new file mode 100755 index 00000000..15aa4c2f --- /dev/null +++ b/scripts/publish.sh @@ -0,0 +1,46 @@ +#!/bin/bash +set -eux + +# all credits go to the argoproj Helm guys https://github.com/argoproj/argo-helm + +SRCROOT="$(cd "$(dirname "$0")/.." && pwd)" +GIT_PUSH=${GIT_PUSH:-false} + +rm -rf $SRCROOT/output && git clone -b gh-pages ssh://git@git.zero-downtime.net:22000/ZeroDownTime/KubeZero.git $SRCROOT/output + +helm repo add stable https://kubernetes-charts.storage.googleapis.com +helm repo add argoproj https://argoproj.github.io/argo-helm + +for dir in $(find $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d); +do + # Cleanup disabled as we have a un-released chart of argo-cd + # rm -rf $dir/charts + + name=$(basename $dir) + + if [ $(helm dep list $dir 2>/dev/null| wc -l) -gt 1 ] + then + # Bug with Helm subcharts with hyphen on them + # https://github.com/argoproj/argo-helm/pull/270#issuecomment-608695684 + if [ "$name" == "argo-cd" ] + then + echo "Restore ArgoCD RedisHA subchart" + git checkout $dir + fi + echo "Processing chart dependencies" + helm --debug dep build $dir + fi + + echo "Processing $dir" + helm --debug package $dir +done + +cp $SRCROOT/*.tgz output/ +cd $SRCROOT/output && helm repo index . + +cd $SRCROOT/output && git status + +if [ "$GIT_PUSH" == "true" ] +then + cd $SRCROOT/output && git add . && git commit -m "Publish charts" && git push ssh://git@git.zero-downtime.net:22000/ZeroDownTime/KubeZero.git gh-pages +fi