summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-12-18 17:10:58 +1300
committerThong Kuah <tkuah@gitlab.com>2018-12-18 18:06:23 +1300
commitbb7d1a5569fec1d2bbd0f9c12b3e6430c60554d5 (patch)
treedc246ce7ccccda9919a988c3dfab5c40838acf20
parentd8f1829bbf449328e6f37617ba4fc4b6f48f9b0f (diff)
downloadgitlab-ce-bash_arrays_with_bash_image.tar.gz
Use alpine with bash imagebash_arrays_with_bash_image
-rw-r--r--lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml25
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml b/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
index fbae8b86486..7fe5642a2ff 100644
--- a/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
@@ -39,6 +39,7 @@
# Note: Auto CI does not work with multiple buildpacks yet
image: alpine:latest
+image: "registry.gitlab.com/tkuah/alpine-bash:master"
variables:
# AUTO_DEVOPS_DOMAIN is the application deployment domain and should be set as a variable at the group or project level.
@@ -606,20 +607,20 @@ rollout 100%:
# Its own function so that we can isolate IFS
function create_application_secret() {
- bash -c '
- prefix="K8S_SECRET_" \
- k8s_variables=$(env | (grep "^${prefix}" || [[ $? == 1 ]])); \
- IFS=$(echo -en "\n\b")
- for k8s_variable in $k8s_variables; do
- param="${k8s_variable#K8S_SECRET_}"
-
- fromLiteralArgs+=("--from-literal")
- fromLiteralArgs+=("${param}")
- done \
- && kubectl create secret \
+ prefix="K8S_SECRET_"
+ k8s_variables=$(env | (grep "^${prefix}" || [[ $? == 1 ]]))
+
+ local IFS=$'\n'
+ for k8s_variable in $k8s_variables; do
+ param="${k8s_variable#K8S_SECRET_}"
+
+ fromLiteralArgs+=("--from-literal")
+ fromLiteralArgs+=("${param}")
+ done
+
+ kubectl create secret \
-n "$KUBE_NAMESPACE" generic "$APPLICATION_SECRET_NAME" ${fromLiteralArgs[@]} -o yaml \
--dry-run | kubectl replace -n "$KUBE_NAMESPACE" --force -f -
- '
}
function deploy() {