Browse Source

Поправил вызов функций k8sHelmOps.upgrade и k8sHelmOps.rollback

Tomishinets Vladimir 3 years ago
parent
commit
3c5f50f2a8
1 changed files with 2 additions and 4 deletions
  1. 2 4
      devK8s.Jenkinsfile

+ 2 - 4
devK8s.Jenkinsfile

@@ -74,16 +74,14 @@ pipeline {
     stage("Update APP") {
       steps {
         script {
-          RELEASENAME = DOCKER_IMAGE.split("/")[0]
-          NAMESPACE = DOCKER_IMAGE.split("/")[0]
           try {
             echo "Update APP to ${IMAGE_TO_PUSH}"
-            k8sHelmOps.upgrade(CONTEXT, NAMESPACE, RELEASENAME, CHART_PATH, VALUES_FILE, HELM_REPO)
+            k8sHelmOps.upgrade(CONTEXT, DOCKER_IMAGE.split("/")[0], DOCKER_IMAGE.split("/")[0], CHART_PATH, VALUES_FILE, HELM_REPO)
             echo "Update success!!!"
           }
           catch(err) {
             echo "Recovering APP"
-            k8sHelmOps.rollback(CONTEXT, NAMESPACE, RELEASENAME)
+            k8sHelmOps.rollback(CONTEXT, DOCKER_IMAGE.split("/")[0], DOCKER_IMAGE.split("/")[0])
             throw err
           }
         }