From 2f3b06d068ffa934e8d86ae2657b1dd2c56cb31e Mon Sep 17 00:00:00 2001
From: runyontr <tom@runyon.dev>
Date: Wed, 4 Nov 2020 19:26:29 +0000
Subject: [PATCH] Cleanup everywhere

---
 .gitlab-ci.yml                 | 15 +++++++--------
 tests/registries.yaml.template |  5 +++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c00fb61cfa..0500935038 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,20 +21,18 @@ package tests:
     - yum -y install wget npm git gettext > /dev/null && wget https://download.docker.com/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo > /dev/null && yum -y install docker-ce-cli > /dev/null && yum -y clean all > /dev/null
     - wget -q "https://get.helm.sh/helm-v3.4.0-linux-amd64.tar.gz" && tar xzf helm-v3.4.0-linux-amd64.tar.gz -C /usr/local/bin/ --strip-components 1 && chmod +x /usr/local/bin/helm
     - curl -s https://toolkit.fluxcd.io/install.sh | bash
-    - wget -q -O /usr/local/bin/argocd "https://github.com/argoproj/argo-cd/releases/download/v1.7.8/argocd-linux-amd64" && chmod +x /usr/local/bin/argocd
-    - wget -q -O /usr/local/bin/mkcert "https://github.com/FiloSottile/mkcert/releases/download/v1.4.1/mkcert-v1.4.1-linux-amd64" && chmod +x /usr/local/bin/mkcert
     - wget -q -O /usr/local/bin/k3d "https://github.com/rancher/k3d/releases/download/v3.1.5/k3d-linux-amd64" && chmod +x /usr/local/bin/k3d
     - wget -q -O /usr/local/bin/kubectl "https://storage.googleapis.com/kubernetes-release/release/v1.19.3/bin/linux/amd64/kubectl" && chmod +x /usr/local/bin/kubectl
-    - wget -q "https://github.com/open-policy-agent/conftest/releases/download/v0.21.0/conftest_0.21.0_Linux_x86_64.tar.gz" && tar xzf conftest_0.21.0_Linux_x86_64.tar.gz -C /usr/local/bin/ && chmod +x /usr/local/bin/conftest
     # Starting dnsmasq for cluster dns resolution
     - docker run -d -p 53:53/udp -p 53:53 janeczku/go-dnsmasq:latest
     - echo "nameserver 127.0.0.1" >> /etc/resolv.conf
 
     # Inject image pull secrets into k3d
+    - export DOLLAR=$
     - env
     - envsubst < tests/registries.yaml.template > tests/registries.yaml
     - cat tests/registries.yaml
-    - docker login registry1.dsop.io  -p ${REGISTRY1_PASSWORD} -u ${REGISTRY1_USER}
+    - docker login registry1.dsop.io  -p ${REGISTRY1_PASSWORD} -u 'robot$bigbang'
     - docker pull registry1.dsop.io/ironbank/opensource/openpolicyagent/gatekeeper:v3.1.2
     
     # Standup cluster
@@ -45,13 +43,13 @@ package tests:
     # Install Flux
     - which flux
     - flux install --timeout 3m0s
-    - while ! (kubectl get ns,pods,hr,gitrepositories -A); do sleep 3; done
+    - kubectl get namespaces,pods,helmrelease,gitrepositories -A 
     # Install Big Bang
     - helm upgrade -i bigbang chart -n flux-system 
     # Wait for healthy
     - sleep 5
-    - kubectl get ns,pods,hr,gitrepositories -A
-    - kubectl wait --for=condition=Ready --timeout 30s helmrelease -n flux-system bigbang-certmanager
+    - kubectl get namespaces,pods,helmrelease,gitrepositories -A
+    - kubectl wait --for=condition=Ready --timeout 300s helmrelease -n flux-system bigbang-certmanager
     - kubectl wait --for=condition=Ready --timeout 300s helmrelease -n flux-system bigbang-gatekeeper
     - kubectl wait --for=condition=Ready --timeout 300s helmrelease -n flux-system bigbang-istio-operator
     - kubectl wait --for=condition=Ready --timeout 300s helmrelease -n flux-system bigbang-istio
@@ -59,6 +57,7 @@ package tests:
     - kubectl wait --for=condition=Ready --timeout 300s helmrelease -n flux-system bigbang-logging-operator
     - kubectl wait --for=condition=Ready --timeout 300s helmrelease -n flux-system bigbang-efk
     - kubectl wait --for=condition=Ready --timeout 300s helmrelease -n flux-system bigbang-twistlock
+
     # Install cypress
 #    - npm install cypress
     # Clean up previous cluster
@@ -77,7 +76,7 @@ package tests:
   script:
     # Place kubernetes package test here
     - echo "Package tests go here"
-    - kubectl get hr -A
+    - kubectl get helmrelease -A
 
   after_script:
     # Delete Cluster
diff --git a/tests/registries.yaml.template b/tests/registries.yaml.template
index 21a442b530..0af845d0ce 100644
--- a/tests/registries.yaml.template
+++ b/tests/registries.yaml.template
@@ -1,5 +1,6 @@
 configs:
   "registry1.dsop.io":
     auth:
-      username: ${REGISTRY1_USER}
-      password: ${REGISTRY1_PASSWORD}
\ No newline at end of file
+      username: robot${DOLLAR}bigbang
+      password: ${REGISTRY1_PASSWORD}
+
-- 
GitLab