Tomishinets Vladimir 4 lat temu
rodzic
commit
be34299f30
1 zmienionych plików z 34 dodań i 34 usunięć
  1. 34 34
      devK8s.Jenkinsfile

+ 34 - 34
devK8s.Jenkinsfile

@@ -72,39 +72,39 @@ pipeline {
         }
       }
     }
-    // stage("Update APP") {
-    //   steps {
-    //     script {
-    //       RELEASENAME = CHART_SUBPATH.split("/")[1]
-    //       try {
-    //         echo "Update APP"
-    //         k8sHelmOps.upgrade(CLOUD, NAMESPACE, RELEASENAME, CHART_PATH)
-    //       }
-    //       catch(err) {
-    //         echo "Recovering APP"
-    //         k8sHelmOps.rollback(CLOUD, NAMESPACE, RELEASENAME)
-    //         throw err
-    //       }
-    //     }
-    //   }
-    // }
-    // stage("Push changes to REPO") {
-    //   steps {
-    //     script {
-    //       echo "Push changes to Repo"
-    //       COMMIT = "Version update ${PROJECT}"
-    //       gitOps.push(HELM_DIR, COMMIT)
-    //     }
-    //   }
-    // }
+    stage("Update APP") {
+      steps {
+        script {
+          RELEASENAME = CHART_SUBPATH.split("/")[1]
+          try {
+            echo "Update APP"
+            k8sHelmOps.upgrade(CLOUD, NAMESPACE, RELEASENAME, CHART_PATH)
+          }
+          catch(err) {
+            echo "Recovering APP"
+            k8sHelmOps.rollback(CLOUD, NAMESPACE, RELEASENAME)
+            throw err
+          }
+        }
+      }
+    }
+    stage("Push changes to REPO") {
+      steps {
+        script {
+          echo "Push changes to Repo"
+          COMMIT = "Version update ${PROJECT}"
+          gitOps.push(HELM_DIR, COMMIT)
+        }
+      }
+    }
+  }
+  post {
+    failure {
+      mail charset: 'UTF-8',
+           subject: "Jenkins build ERROR",
+           mimeType: 'text/html',
+           to: "${mailto}",
+           body: "<b>ATTENTION!!!</b> <b><br> Jenkins job failed.\n\n <b><br>Project Name:</b> ${env.JOB_NAME} <b><br>\nBuild Number:</b> ${env.BUILD_NUMBER} <b><br>\nURL Build:</b> ${RUN_DISPLAY_URL}"
+    }
   }
-  // post {
-  //   failure {
-  //     mail charset: 'UTF-8',
-  //          subject: "Jenkins build ERROR",
-  //          mimeType: 'text/html',
-  //          to: "${mailto}",
-  //          body: "<b>ATTENTION!!!</b> <b><br> Jenkins job failed.\n\n <b><br>Project Name:</b> ${env.JOB_NAME} <b><br>\nBuild Number:</b> ${env.BUILD_NUMBER} <b><br>\nURL Build:</b> ${RUN_DISPLAY_URL}"
-  //   }
-  // }
 }