Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorwalkafwalka <aaron.walker@goldenhippo.com>2019-01-19 20:12:33 +0300
committerwalkafwalka <aaron.walker@goldenhippo.com>2019-01-19 20:19:47 +0300
commit338f4b699494baca5b30c8c644db4cadf2afa99f (patch)
treeb410ba960d2cd97d2fa5042e022787a82c4f1939 /lib
parent1b3c6e0e451d8ef7a6d60f2d13e31d8bbcbdb444 (diff)
Changed AutoDevops function k8s_prefixed_variables to temp file
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml26
1 files changed, 10 insertions, 16 deletions
diff --git a/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml b/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
index d2a1f944c56..9362596eb60 100644
--- a/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
@@ -611,22 +611,16 @@ rollout 100%:
track="${1-stable}"
export APPLICATION_SECRET_NAME=$(application_secret_name "$track")
- bash -c '
- function k8s_prefixed_variables() {
- env | sed -n "s/^K8S_SECRET_\(.*\)$/\1/p"
- }
-
- kubectl create secret \
- -n "$KUBE_NAMESPACE" generic "$APPLICATION_SECRET_NAME" \
- --from-env-file <(k8s_prefixed_variables) -o yaml --dry-run |
- kubectl replace -n "$KUBE_NAMESPACE" --force -f -
- '
-
- function k8s_prefixed_variables() {
- env | sed -n "s/^K8S_SECRET_\(.*\)$/\1/p"
- }
-
- APPLICATION_SECRET_CHECKSUM=$(k8s_prefixed_variables | sha256sum | cut -d ' ' -f 1)
+ env | sed -n "s/^K8S_SECRET_\(.*\)$/\1/p" > k8s_prefixed_variables
+
+ kubectl create secret \
+ -n "$KUBE_NAMESPACE" generic "$APPLICATION_SECRET_NAME" \
+ --from-env-file k8s_prefixed_variables -o yaml --dry-run |
+ kubectl replace -n "$KUBE_NAMESPACE" --force -f -
+
+ export APPLICATION_SECRET_CHECKSUM=$(cat k8s_prefixed_variables | sha256sum | cut -d ' ' -f 1)
+
+ rm k8s_prefixed_variables
}
function deploy_name() {