From bb7d1a5569fec1d2bbd0f9c12b3e6430c60554d5 Mon Sep 17 00:00:00 2001 From: Thong Kuah Date: Tue, 18 Dec 2018 17:10:58 +1300 Subject: Use alpine with bash image --- lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml | 25 ++++++++++++----------- 1 file 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() { -- cgit v1.2.1