From 2ca5f8da0e3cb7e9bad88cd64fe2d922395b2918 Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Wed, 29 Nov 2023 09:16:07 +0100
Subject: [PATCH] e2e update jenkinsfile rollout fix

---
 alfa-client/apps/alfa-e2e/Jenkinsfile | 44 +++++++++------------------
 1 file changed, 15 insertions(+), 29 deletions(-)

diff --git a/alfa-client/apps/alfa-e2e/Jenkinsfile b/alfa-client/apps/alfa-e2e/Jenkinsfile
index 1557d4b3ce..390847897e 100644
--- a/alfa-client/apps/alfa-e2e/Jenkinsfile
+++ b/alfa-client/apps/alfa-e2e/Jenkinsfile
@@ -171,51 +171,37 @@ pipeline {
 
                     checkoutGitopsE2eBranch()
 
-                    deleteOzgCloudStack([env.MAIN_BEZEICHNER])
+                    deleteKopStack([env.EA_BEZEICHNER, env.MAIN_BEZEICHNER])
 
                     generateMainNamespaceYaml()
+                    generateEaNamespaceYaml()
 
                     pushGitopsRepo()
 
-                    waitForOzgCloudStackRollout([env.MAIN_BEZEICHNER])
+                    waitForKopStackRollout([env.EA_BEZEICHNER, env.MAIN_BEZEICHNER])
                 }
             }
             post {
                 failure {
                     script {
-                        deleteOzgCloudStack([env.MAIN_BEZEICHNER])
+                        deleteOzgCloudStack([env.EA_BEZEICHNER, env.MAIN_BEZEICHNER])
                     }
                 }
             }
         }
 
-        stage('Rollout E2E EA') {
-			when {
-				expression { !SKIP_RUN }
-			}
-			steps {
-				script {
-					FAILED_STAGE = env.STAGE_NAME
-
-					checkoutGitopsE2eBranch()
-
-					deleteOzgCloudStack([env.EA_BEZEICHNER])
-
-					generateEaNamespaceYaml()
-
-					pushGitopsRepo()
+        stage('Init PortForwards') {
+            when {
+                expression { !SKIP_RUN }
+            }
+            steps {
+                script {
+                    FAILED_STAGE = env.STAGE_NAME
 
-					waitForOzgCloudStackRollout([env.EA_BEZEICHNER])
-				}
-			}
-			post {
-				failure {
-					script {
-						deleteOzgCloudStack([env.EA_BEZEICHNER])
-					}
-				}
-			}
-		}
+                    forwardElasticSearch()
+                }
+            }
+        }
 
         stage('Run E2E-Tests') {
             when {
-- 
GitLab