[CORD-3050] Fix `helm lint` with dependent charts
Change-Id: Id7057516224c04d5bfe4d71d752f692a9e336a61
diff --git a/jjb/shell/helmlint.sh b/jjb/shell/helmlint.sh
index a868179..16184c2 100755
--- a/jjb/shell/helmlint.sh
+++ b/jjb/shell/helmlint.sh
@@ -33,6 +33,11 @@
chartdir=$(dirname "${chart}")
+ # update requirements if it exists. Skip voltha as it has non-clean reqirements
+ if [ "${chartdir}" != "./voltha" ] && [ -f "${chartdir}/requirements.yaml" ]; then
+ helm dependency update "${chartdir}"
+ fi
+
# lint with values.yaml if it exists
if [ -f "${chartdir}/values.yaml" ]; then
helm lint --strict --values "${chartdir}/values.yaml" "${chartdir}"
@@ -46,4 +51,8 @@
fi
done
-exit ${fail_lint}
+if [[ $fail_lint != 0 ]]; then
+ exit 1
+fi
+
+exit 0