From d45df6926ed484d7c595d2bfc3c0de51580acaf0 Mon Sep 17 00:00:00 2001
From: joshwolf <josh@rancherfederal.com>
Date: Thu, 20 May 2021 21:35:10 +0000
Subject: [PATCH] Merge branch 'new-robot' into 'master'

Breaking Change (not really): add new robot account to CI

See merge request platform-one/big-bang/bigbang!492

(cherry picked from commit e87ec902f42be97c9ab9df4fd681c380d137bf39)

ea482118 add new robot account to CI
b8ced776 :eyes:
565344cf :rage:
e5cc4557 :rage: :rage:
---
 .gitlab-ci.yml                      | 6 +++++-
 scripts/deploy/00_deploy_flux.sh    | 4 ++--
 scripts/deploy/01_deploy_bigbang.sh | 4 ++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2e9cb16d8e..0991fd7675 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -348,7 +348,11 @@ package:
   before_script:
     # Set up auth
     - mkdir -p /root/.docker
-    - echo $DOCKER_AUTH_CONFIG > /root/.docker/config.json
+    - |
+      jq -n '{"auths": {"registry.dso.mil": {"auth": $bb_registry_auth}, "registry1.dso.mil": {"auth": $registry1_auth}, "registry.il2.dso.mil": {"auth": $il2_registry_auth} } }' \
+        --arg bb_registry_auth ${BB_REGISTRY_AUTH} \
+        --arg registry1_auth ${REGISTRY1_AUTH} \
+        --arg il2_registry_auth ${IL2_REGISTRY_AUTH} > /root/.docker/config.json
   script:
     - cp ./scripts/package/synker.yaml ./synker.yaml
     # Populate images list in synker config
diff --git a/scripts/deploy/00_deploy_flux.sh b/scripts/deploy/00_deploy_flux.sh
index e830e35ead..7c507dfe56 100644
--- a/scripts/deploy/00_deploy_flux.sh
+++ b/scripts/deploy/00_deploy_flux.sh
@@ -4,6 +4,6 @@ set -ex
 
 # install flux with the dedicated helper script
 ./scripts/install_flux.sh \
-  --registry-username 'robot$bigbang' \
-  --registry-password "$REGISTRY1_PASSWORD" \
+  --registry-username 'robot$bb-dev-imagepullonly' \
+  --registry-password "${REGISTRY1_PASSWORD}" \
   --registry-email bigbang@bigbang.dev 
\ No newline at end of file
diff --git a/scripts/deploy/01_deploy_bigbang.sh b/scripts/deploy/01_deploy_bigbang.sh
index 84eea5176e..aa124ba052 100755
--- a/scripts/deploy/01_deploy_bigbang.sh
+++ b/scripts/deploy/01_deploy_bigbang.sh
@@ -28,8 +28,8 @@ echo "Installing BigBang with the following configurations:"
 cat $CI_VALUES_FILE
 
 helm upgrade -i bigbang chart -n bigbang --create-namespace \
-  --set registryCredentials[0].username='robot$bigbang' \
-  --set registryCredentials[0].password="$REGISTRY1_PASSWORD" \
+  --set registryCredentials[0].username='robot$bb-dev-imagepullonly' \
+  --set registryCredentials[0].password="${REGISTRY1_PASSWORD}" \
   --set registryCredentials[0].registry=registry1.dso.mil \
   -f ${CI_VALUES_FILE}
 
-- 
GitLab