CI/CD tools update

This commit is contained in:
Stefan Reimer 2021-01-21 10:53:53 +00:00
parent adefd7433b
commit d28e18766a
5 changed files with 32 additions and 16 deletions

View File

@ -1,4 +1,2 @@
# Ignore sub-charts
charts/*/charts/*
charts/kubezero-lib
deploy
# Only our own charts, see Makefile
charts/

View File

@ -2,7 +2,7 @@ BUCKET ?= zero-downtime
BUCKET_PREFIX ?= /cloudbender/distfiles
FILES ?= distfiles.txt
.PHONY: clean update
.PHONY: clean update docs
all: update
@ -12,3 +12,10 @@ clean:
update:
./script/update_helm.sh
docs:
for c in charts/*; do \
[[ $$c =~ "kubezero-lib" ]] && continue ; \
[[ $$c =~ "kubeadm" ]] && continue ; \
helm-docs -c $$c ; \
done

View File

@ -15,10 +15,10 @@ All chosen components are 100% organic OpenSource.
# Version / Support Matrix
| KubeZero \ Kubernetes Version | v1.17 | v1.18 | v1.19 | v1.20+| EOL |
| KubeZero \ Kubernetes Version | v1.17 | v1.18 | v1.19 | v1.20 | EOL |
|----------------------------------------|-------|-------|-------|-------|-------------|
| master branch | no | yes | beta | no | |
| stable branch | yes | no | no | no | |
| stable branch | no | yes | no | no | |
| v2.18.0 | no | yes | no | no | 30 Apr 2021 |
| v1 | yes | no | no | no | 30 Jan 2021 |

View File

@ -60,4 +60,4 @@ Kubernetes: `>= 1.16.0`
| metrics.namespace | string | `"monitoring"` | |
----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.2.1](https://github.com/norwoodj/helm-docs/releases/v1.2.1)
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)

View File

@ -1,5 +1,5 @@
#!/bin/bash
set -eux
set -eu
CHARTS=${1:-'.*'}
# all credits go to the argoproj Helm guys https://github.com/argoproj/argo-helm
@ -7,9 +7,14 @@ CHARTS=${1:-'.*'}
SRCROOT="$(cd "$(dirname "$0")/.." && pwd)"
GIT_PUSH=${GIT_PUSH:-true}
rm -rf $SRCROOT/output && git clone -b gh-pages ssh://git@git.zero-downtime.net:22000/ZeroDownTime/KubeZero.git $SRCROOT/output
[ "$(git branch --show-current)" == "stable" ] || { echo "Helm packages should only be built from stable branch !"; exit 1; }
TMPDIR=$(mktemp -d kubezero-repo.XXX)
mkdir -p $TMPDIR/stage
git clone -b gh-pages ssh://git@git.zero-downtime.net:22000/ZeroDownTime/KubeZero.git $TMPDIR/repo
# Reset all
# rm -rf $SRCROOT/output/*tgz $SRCROOT/output/index.yaml
# rm -rf $TMPDIR/repo/*tgz $TMPDIR/repo/index.yaml
helm repo add argoproj https://argoproj.github.io/argo-helm
helm repo add jetstack https://charts.jetstack.io
@ -29,15 +34,21 @@ do
echo "Processing $dir"
helm lint $dir || true
helm --debug package $dir
helm --debug package -d $TMPDIR/stage $dir
done
cp $SRCROOT/*.tgz output/
cd $SRCROOT/output && helm repo index .
# Do NOT overwrite existing charts
cp -n $TMPDIR/stage/*.tgz $TMPDIR/repo
cd $SRCROOT/output && git status
cd $TMPDIR/repo
helm repo index .
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
git add . && git commit -m "Publish charts" && git push ssh://git@git.zero-downtime.net:22000/ZeroDownTime/KubeZero.git gh-pages
fi
cd -
rm -rf $TMPDIR