From 4d2905c553b210399268bf1f01e29781e57c351d Mon Sep 17 00:00:00 2001
From: David Hoese <david.hoese@ssec.wisc.edu>
Date: Tue, 7 Jul 2020 20:24:05 -0500
Subject: [PATCH] Try handling secret not existing for rabbitmq deploy

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f3a2ceb..1140e66 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -109,7 +109,7 @@ deploy_prod_rabbit:
     - kubeconfig=$(basename $kubekorner_k3s_config)
     # get password from any previous installation
     # if we don't do this the password will get out of sync
-    - pw=$(kubectl --kubeconfig $kubeconfig get secret --namespace geosphere-test geosphere-rabbit-rabbitmq -o jsonpath="{.data.rabbitmq-password}" | base64 -d)
+    - pw=$((kubectl --kubeconfig $kubeconfig get secret --namespace geosphere-test geosphere-rabbit-rabbitmq -o jsonpath="{.data.rabbitmq-password}" || echo "") | base64 -d)
     - auth_sec="geosphere-rabbit-rabbitmq"
     - if [ $pw != "" ]; then EXTRA_ARGS="--set auth.existingPasswordSecret=$auth_sec --set auth.existingErlangSecret=$auth_sec"; fi
     # install third-party rabbitmq server
-- 
GitLab