From e8553bc1c4419104cd791fa007e7d22668b0acec Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Fri, 21 May 2021 11:59:02 +0200
Subject: [PATCH] readd rollout

---
 Jenkinsfile | 35 ++++++++++++++++++++++++++++-------
 1 file changed, 28 insertions(+), 7 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 114114e8b..4aff3daaf 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -84,6 +84,34 @@ pipeline {
                 }
             }
         }
+
+        stage('Deploy Intelliform-Adapter') {	
+            when {	
+                anyOf {	
+                    branch 'master'	
+                    branch 'release'	
+                }	
+            }	
+            	
+            steps {	
+                script {	
+                    FAILED_STAGE = env.STAGE_NAME	
+                }	
+                container("kubectl"){	
+                    script {	
+                        if (env.BRANCH_NAME == 'release') {	
+                            sh 'kubectl rollout restart deployment/if-adapter -n sh-land-test'	
+                            sh 'kubectl rollout status deployment/if-adapter -n sh-land-test'	
+                        }	
+
+                        if (env.BRANCH_NAME == 'master') {	
+                            sh 'kubectl rollout restart deployment/if-adapter -n sh-land'	
+                            sh 'kubectl rollout status deployment/if-adapter -n sh-land'	
+                        }	
+                    }	
+                }	
+            }	
+        }
     }
     post {
         failure {
@@ -93,12 +121,5 @@ pipeline {
                 }
             }
         }
-        success {
-            script {
-                if (env.BRANCH_NAME == 'master') {
-                    slackSend(color: "good", message: "Intelliform-Adapter: Build Success. <https://kuby.ozg-sh.de/dashboard/c/c-czx7w/explorer/apps.deployment> Namspace: sh-land if-adapter -> Redeploy")
-                }
-            }
-        }
     }
 }
\ No newline at end of file
-- 
GitLab