File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 88# ARGOCD_APP_SOURCE_PATH - the path of the app within the repo
99# ARGOCD_APP_SOURCE_REPO_URL the repo's URL
1010# ARGOCD_APP_SOURCE_TARGET_REVISION - the target revision from the spec, e.g. master.
11-
12- # does not have "v" in front
1311# KUBE_VERSION="<major>.<minor>"
1412# KUBE_API_VERSIONS="v1,apps/v1,..."
1513
1614set -e
1715set -x
1816
17+ cleanup () {
18+ if [[ " ${ARGOCD_ENV_ADDITIONAL_VALUES} " ]] ; then
19+ rm -r $tmpfile
20+ fi
21+ }
22+
23+ trap " cleanup" ERR
24+
1925echoerr () { printf " %s\n" " $* " >&2 ; }
2026
2127# exit immediately if no phase is passed in
@@ -85,11 +91,20 @@ case $phase in
8591 HELM_VALUES_FILE=" --values ${file} ${HELM_VALUES_FILE} "
8692 done
8793
94+ if [[ " ${ARGOCD_ENV_ADDITIONAL_VALUES} " ]] ; then
95+ echoerr " Detected additional values"
96+ tmpfile=$( mktemp /tmp/helmfile-additional-values-XXXXXX)
97+ echo " ${ARGOCD_ENV_ADDITIONAL_VALUES} " > $tmpfile
98+ HELM_VALUES_FILE=" --values ${tmpfile} ${HELM_VALUES_FILE} "
99+ fi
100+
88101 ${helmfile} \
89102 template \
90103 --skip-deps \
91104 --args " ${INTERNAL_HELM_TEMPLATE_OPTIONS} " \
92105 ${HELM_VALUES_FILE}
106+
107+ cleanup
93108 ;;
94109
95110 * )
You can’t perform that action at this time.
0 commit comments