chore!: Chart Publications via Github Workflow (#741)

* feat: Move Linting to Github Actions

Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
This commit is contained in:
Oliver Bähler 2021-05-21 17:59:30 +02:00 committed by GitHub
parent 35c754364f
commit 9a3077afe2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 84 additions and 87 deletions

View file

@ -12,6 +12,6 @@ docker run \
quay.io/helmpack/chart-testing:v3.3.1 \
-c cd /workdir \
ct lint \
--config .github/ct.yaml \
--lint-conf .github/lintconf.yaml \
--config .github/configs/ct-lint.yaml \
--lint-conf .github/configs/lintconf.yaml \
--debug

View file

@ -1,42 +0,0 @@
#!/bin/bash
set -eux
SRCROOT="$(cd "$(dirname "$0")/.." && pwd)"
GIT_PUSH=${GIT_PUSH:-false}
rm -rf $SRCROOT/output && git clone -b gh-pages git@github.com:argoproj/argo-helm.git $SRCROOT/output
helm repo add argoproj https://argoproj.github.io/argo-helm
for dir in $(find $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d);
do
rm -rf $dir/charts
name=$(basename $dir)
if [ $(helm dep list $dir 2>/dev/null| wc -l) -gt 1 ]
then
echo "Processing chart dependencies"
helm --debug dep build $dir
# 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"
tar -C $dir/charts -xf $dir/charts/redis-ha-*.tgz
fi
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 git@github.com:argoproj/argo-helm.git gh-pages
fi