From 6211da2c66ac72b67ee0072285659a6afcd87db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Juan=20G=C3=B3mez=20Pe=C3=B1alver?= Date: Sat, 4 Apr 2020 00:19:16 +0100 Subject: [PATCH] fix: lint and publish scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Carlos Juan Gómez Peñalver --- scripts/lint.sh | 21 +++++++++++---------- scripts/publish.sh | 11 +++++++++++ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/scripts/lint.sh b/scripts/lint.sh index e0c7a222..7c400e2c 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -5,14 +5,15 @@ SRCROOT="$(cd "$(dirname "$0")/.." && pwd)" for dir in $(find $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d); do - name=$(basename $dir) - echo "Running Helm linting for $name" - docker run \ - -v "$SRCROOT:/workdir" \ - gcr.io/kubernetes-charts-ci/test-image:v3.0.1 \ - ct \ - lint \ - --config .circleci/chart-testing.yaml \ - --lint-conf .circleci/lintconf.yaml \ - --charts "/workdir/charts/${name}" + sudo rm -rf $dir/charts + name=$(basename $dir) + echo "Running Helm linting for $name" + docker run \ + -v "$SRCROOT:/workdir" \ + gcr.io/kubernetes-charts-ci/test-image:v3.1.0 \ + ct \ + lint \ + --config .circleci/chart-testing.yaml \ + --lint-conf .circleci/lintconf.yaml \ + --charts "/workdir/charts/${name}" done diff --git a/scripts/publish.sh b/scripts/publish.sh index 5d90f19d..777ab5ac 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -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); do + sudo 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