File tree 1 file changed +17
-2
lines changed
1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 8
8
# ARGOCD_APP_SOURCE_PATH - the path of the app within the repo
9
9
# ARGOCD_APP_SOURCE_REPO_URL the repo's URL
10
10
# ARGOCD_APP_SOURCE_TARGET_REVISION - the target revision from the spec, e.g. master.
11
-
12
- # does not have "v" in front
13
11
# KUBE_VERSION="<major>.<minor>"
14
12
# KUBE_API_VERSIONS="v1,apps/v1,..."
15
13
16
14
set -e
17
15
set -x
18
16
17
+ cleanup () {
18
+ if [[ " ${ARGOCD_ENV_ADDITIONAL_VALUES} " ]] ; then
19
+ rm -r $tmpfile
20
+ fi
21
+ }
22
+
23
+ trap " cleanup" ERR
24
+
19
25
echoerr () { printf " %s\n" " $* " >&2 ; }
20
26
21
27
# exit immediately if no phase is passed in
@@ -85,11 +91,20 @@ case $phase in
85
91
HELM_VALUES_FILE=" --values ${file} ${HELM_VALUES_FILE} "
86
92
done
87
93
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
+
88
101
${helmfile} \
89
102
template \
90
103
--skip-deps \
91
104
--args " ${INTERNAL_HELM_TEMPLATE_OPTIONS} " \
92
105
${HELM_VALUES_FILE}
106
+
107
+ cleanup
93
108
;;
94
109
95
110
* )
You can’t perform that action at this time.
0 commit comments