Update check-helm-chart parameters ci script
Add ignore lists for concourse and k8s
#!/bin/bash
set -e
-CHART=$PWD/helm-chart
+CHART=$PWD/concourse
+
+concourse_ignore_list="CONCOURSE_VERSION|CREDHUB"
+k8s_ignore_list="LIVENESS_PROBE_FATAL_ERRORS|POD_IP"
-unnecessary="CONCOURSE_VERSION"
expected=
for sc in web worker; do
- expected+="$(concourse $sc --help 2>&1 | grep -o '\[\$CONCOURSE_.*\]' | tr -d \[\]\$ | grep -v "$unnecessary")\n"
+ expected+="$(concourse $sc --help 2>&1 | grep -o '\[\$.*\]' | tr -d \[\]\$ | egrep -v "$concourse_ignore_list")\n"
done
-actual="$(grep -REhv '\s+#\s+' $CHART | grep -Eoh 'CONCOURSE_([A-Z_])+')"
+actual="$(grep -REhv '\s+#\s+' $CHART | grep -Eoh 'name: ([A-Z_])+' | sed -e "s/^name: //" | egrep -v "$k8s_ignore_list")"
echo These parameters need to be removed from the Helm chart:
to_remove=$(comm -23 <(echo "$actual" | sort | uniq) <(echo -e "$expected" | sort | uniq) | paste -sd, -)
echo "$to_remove"
