From 63581bab2bfb3eb34811427a1218810aa638fd9c Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Thu, 23 Nov 2023 17:21:47 +0100
Subject: [PATCH] e2e tests, rollout nacheinander

---
 goofy-client/apps/goofy-e2e/Jenkinsfile | 31 +++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/goofy-client/apps/goofy-e2e/Jenkinsfile b/goofy-client/apps/goofy-e2e/Jenkinsfile
index af39449c37..3f5f9a0727 100644
--- a/goofy-client/apps/goofy-e2e/Jenkinsfile
+++ b/goofy-client/apps/goofy-e2e/Jenkinsfile
@@ -161,7 +161,7 @@ pipeline {
             }
         }
 
-        stage('Rollout E2E Namespaces') {
+        stage('Rollout E2E Main') {
             when {
                 expression { !SKIP_RUN }
             }
@@ -173,7 +173,6 @@ pipeline {
 
                     deleteKopStack([env.EA_BEZEICHNER, env.MAIN_BEZEICHNER])
 
-                    generateEaNamespaceYaml()
                     generateMainNamespaceYaml()
 
                     pushGitopsRepo()
@@ -190,6 +189,34 @@ pipeline {
             }
         }
 
+        stage('Rollout E2E EA') {
+            when {
+                expression { !SKIP_RUN }
+            }
+            steps {
+                script {
+                    FAILED_STAGE = env.STAGE_NAME
+
+                    checkoutGitopsE2eBranch()
+
+                    deleteKopStack([env.EA_BEZEICHNER, env.MAIN_BEZEICHNER])
+
+                    generateEaNamespaceYaml()
+
+                    pushGitopsRepo()
+
+                    waitForKopStackRollout([env.EA_BEZEICHNER, env.MAIN_BEZEICHNER])
+                }
+            }
+            post {
+                failure {
+                    script {
+                        deleteKopStack([env.EA_BEZEICHNER, env.MAIN_BEZEICHNER])
+                    }
+                }
+            }
+        }
+
         stage('Run E2E-Tests') {
             when {
                 expression { !SKIP_RUN }
-- 
GitLab