Browse Source

Обновить 'Jenkinsfile_keygen'

Vladimir Tomishinets 6 years ago
parent
commit
941298ade0
1 changed files with 1 additions and 6 deletions
  1. 1 6
      Jenkinsfile_keygen

+ 1 - 6
Jenkinsfile_keygen

@@ -47,6 +47,7 @@ pipeline {
           def zip = "${WORKSPACE}/${PKI_GIT_NAME}/open/easy-rsa/client_keys/sds-${key_name}.zip"
           if (fileExists(zip)) {
             currentBuild.result = 'ABORTED'
+            error ("Certs already exist!!!")
             return
           }
         }
@@ -55,9 +56,6 @@ pipeline {
     stage("Generate Keys and Certs") {
       steps {
         script {
-          if (currentBuild.result == 'ABORTED') {
-            return
-          }
           echo "Running ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:latest."
           withCredentials([sshUserPrivateKey(credentialsId: 'provision', keyFileVariable: 'GIT_SSH_KEY', passphraseVariable: '', usernameVariable: 'GIT_SSH_USERNAME')]) {
             sh '''set +x
@@ -72,9 +70,6 @@ pipeline {
     stage("Generate configs") {
       steps {
         script {
-          if (currentBuild.result == 'ABORTED') {
-             return
-          }
           echo "Delete old repo version"
           sh 'rm -rf ${WORKSPACE}/${PKI_GIT_NAME} && rm -rf ${WORKSPACE}/${OVPN_GIT_DIR}'
           echo "Generate ccd config"