Browse Source

disable success

Владимир Томишинец 5 years ago
parent
commit
6239d4798a
1 changed files with 3 additions and 10 deletions
  1. 3 10
      Jenkinsfile-prod

+ 3 - 10
Jenkinsfile-prod

@@ -30,7 +30,7 @@ pipeline {
       steps{
       steps{
         withCredentials([sshUserPrivateKey(credentialsId: 'provision', keyFileVariable: 'GIT_SSH_KEY', passphraseVariable: '', usernameVariable: 'GIT_SSH_USERNAME')]) {
         withCredentials([sshUserPrivateKey(credentialsId: 'provision', keyFileVariable: 'GIT_SSH_KEY', passphraseVariable: '', usernameVariable: 'GIT_SSH_USERNAME')]) {
           sh """GIT_SSH_COMMAND='ssh -i ${GIT_SSH_KEY} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
           sh """GIT_SSH_COMMAND='ssh -i ${GIT_SSH_KEY} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
-                git clone ${SWARM_GIT_URL}
+                  git clone ${SWARM_GIT_URL}
                 cd ${SWARM_GIT_NAME}
                 cd ${SWARM_GIT_NAME}
                 cp -f tags/${DOCKER_IMAGE}.dev-version tags/${DOCKER_IMAGE}.version
                 cp -f tags/${DOCKER_IMAGE}.dev-version tags/${DOCKER_IMAGE}.version
                 git add -A
                 git add -A
@@ -38,8 +38,8 @@ pipeline {
                 git config --global user.name "Jenkins"
                 git config --global user.name "Jenkins"
                 git commit -m 'Version update'| grep ''     # Shield ourself from non-zero exit code from 'git commit' command
                 git commit -m 'Version update'| grep ''     # Shield ourself from non-zero exit code from 'git commit' command
                 GIT_SSH_COMMAND='ssh -i ${GIT_SSH_KEY} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
                 GIT_SSH_COMMAND='ssh -i ${GIT_SSH_KEY} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
-                git push origin master
-                ls"""
+                  git push origin master
+             """
         }
         }
       }
       }
     }
     }
@@ -87,12 +87,5 @@ pipeline {
            to: "${mailto}",
            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}"
            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}"
     }
     }
-    success {
-      mail charset: 'UTF-8',
-           subject: "Jenkins build SUSCCESS",
-           mimeType: 'text/html',
-           to: "${mailto}",
-           body: "<b>Congradulations!!!</b> <b><br> Jenkins job succefully finished.\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}"
-    }
   }
   }
 }
 }