From 452e1beb94cf9ae4962b11be130f62a2b236d58e Mon Sep 17 00:00:00 2001
From: Nicolas <nicolas@bejean.fr>
Date: Sat, 29 Jan 2022 09:38:17 +0000
Subject: [PATCH] feat: Change runner & Add Sleep step

---
 .gitlab-ci.yml | 29 ++++++++++++++++++++---------
 1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2296a27..8fd12b5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,6 +6,7 @@ stages:
   - gke
   - psc
   - elastic
+  - sleep
   - destroy
 
 variables:
@@ -25,7 +26,7 @@ check-gke:
   stage: gke
   tags:
     - docker
-    - amd64
+    - cache
   image:
     name: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
     entrypoint: [""]
@@ -61,7 +62,7 @@ apply-gke:
     - check-gke
   tags:
     - docker
-    - amd64
+    - cache
   image:
     name: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
     entrypoint: [""]
@@ -89,7 +90,7 @@ gcloud-psc:
     - apply-gke
   tags:
     - docker
-    - amd64
+    - cache
   image:
     name: google/cloud-sdk:slim
     entrypoint: [""]
@@ -124,7 +125,7 @@ check-elastic:
   stage: elastic
   tags:
     - docker
-    - amd64
+    - cache
   needs:
     - gcloud-psc
   image:
@@ -157,7 +158,7 @@ apply-elastic:
     - check-elastic
   tags:
     - docker
-    - amd64
+    - cache
   image:
     name: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
     entrypoint: [""]
@@ -173,11 +174,21 @@ apply-elastic:
       gitlab-terraform init
       gitlab-terraform apply -auto-approve
 
+sleep:
+  stage: sleep
+  needs:
+    - apply-elastic
+  script:
+    - |
+      sleep 1m
+
 destroy-psc:
   stage: destroy
+  needs:
+    - sleep
   tags:
     - docker
-    - amd64
+    - cache
   image:
     name: google/cloud-sdk:slim
     entrypoint: [""]
@@ -214,7 +225,7 @@ destroy-elastic:
     - destroy-psc
   tags:
     - docker
-    - amd64
+    - cache
   image:
     name: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
     entrypoint: [""]
@@ -236,7 +247,7 @@ destroy-gke:
     - destroy-psc
   tags:
     - docker
-    - amd64
+    - cache
   image:
     name: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
     entrypoint: [""]
@@ -255,4 +266,4 @@ destroy-gke:
   script:
     - |
       gitlab-terraform init
-      gitlab-terraform destroy -auto-approve
\ No newline at end of file
+      gitlab-terraform destroy -auto-approve
-- 
GitLab