fix: lint and publish scripts

Signed-off-by: Carlos Juan Gómez Peñalver <carlosjuangp@gmail.com>
This commit is contained in:
Carlos Juan Gómez Peñalver 2020-04-04 00:19:16 +01:00
parent a2f485f27d
commit 6211da2c66
2 changed files with 22 additions and 10 deletions

View file

@ -5,14 +5,15 @@ SRCROOT="$(cd "$(dirname "$0")/.." && pwd)"
for dir in $(find $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d); for dir in $(find $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d);
do do
name=$(basename $dir) sudo rm -rf $dir/charts
echo "Running Helm linting for $name" name=$(basename $dir)
docker run \ echo "Running Helm linting for $name"
-v "$SRCROOT:/workdir" \ docker run \
gcr.io/kubernetes-charts-ci/test-image:v3.0.1 \ -v "$SRCROOT:/workdir" \
ct \ gcr.io/kubernetes-charts-ci/test-image:v3.1.0 \
lint \ ct \
--config .circleci/chart-testing.yaml \ lint \
--lint-conf .circleci/lintconf.yaml \ --config .circleci/chart-testing.yaml \
--charts "/workdir/charts/${name}" --lint-conf .circleci/lintconf.yaml \
--charts "/workdir/charts/${name}"
done done

View file

@ -8,8 +8,19 @@ rm -rf $SRCROOT/output && git clone -b gh-pages git@github.com:argoproj/argo-hel
for dir in $(find $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d); for dir in $(find $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d);
do do
sudo rm -rf $dir/charts
name=$(basename $dir)
if [ $(helm dep list $dir 2>/dev/null| wc -l) -gt 1 ] if [ $(helm dep list $dir 2>/dev/null| wc -l) -gt 1 ]
then 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" echo "Processing chart dependencies"
helm --debug dep build $dir helm --debug dep build $dir
fi fi