From 153f071d5e1d0cf6c84464694e64f003bcdb1235 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20B=C3=A9jean?= <nicolas@bejean.fr>
Date: Tue, 14 Dec 2021 17:27:31 +0100
Subject: [PATCH] feat: Add custom stages

---
 .gitlab-ci.yml | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 86e8a9f..0bfaa62 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,11 @@
 
 image: busybox:latest
 
+stages:
+  - gke
+  - psc
+  - elastic
+
 variables:
   TF_ROOT_ELASTIC: ${CI_PROJECT_DIR}/manifests/elastic
   TF_ROOT_GKE: ${CI_PROJECT_DIR}/manifests/gke
@@ -16,7 +21,7 @@ cache:
       - ${TF_ROOT_GKE}/.terraform
 
 check-gke:
-  stage: test
+  stage: gke
   tags:
     - docker
     - amd64
@@ -47,7 +52,7 @@ check-gke:
       terraform: ${TF_ROOT_GKE}/plan.json
 
 apply-gke:
-  stage: deploy
+  stage: gke
   needs:
     - check-gke
   tags:
@@ -70,8 +75,9 @@ apply-gke:
     gitlab-terraform init 
     gitlab-terraform apply -auto-approve
 
+
 gcloud-psc:
-  stage: deploy
+  stage: psc
   needs:
     - apply-gke
   tags:
@@ -104,7 +110,7 @@ gcloud-psc:
       - ${CI_PROJECT_DIR}/pscConnectionId.env
 
 check-elastic:
-  stage: deploy
+  stage: elastic
   tags:
     - docker
     - amd64
@@ -132,7 +138,7 @@ check-elastic:
       terraform: ${TF_ROOT_ELASTIC}/plan.json
 
 apply-elastic:
-  stage: deploy
+  stage: elastic
   needs:
     - check-elastic
   tags:
-- 
GitLab