Tomishinets Vladimir 4 yıl önce
ebeveyn
işleme
d730c0fb21
1 değiştirilmiş dosya ile 2 ekleme ve 6 silme
  1. 2 6
      OFFICERenewalWildcardJenkinsfile

+ 2 - 6
OFFICERenewalWildcardJenkinsfile

@@ -79,20 +79,16 @@ pipeline {
 // Следующие 2 строчки после тестирования необходимо убрать, так как репозитории клонируются в предыдущем шаге
           git_clone(PKI_GIT_URL)
           git_clone(SWARM_GIT_URL)
-//          withCredentials([sshUserPrivateKey(credentialsId: 'ansible', keyFileVariable: 'GIT_SSH_KEY', passphraseVariable: '', usernameVariable: 'GIT_SSH_USERNAME')]) {
-//            sh "ssh -i ${GIT_SSH_KEY} ansible@pbx.sdsys.ru"
-//          }
           NEW_ENDDATE = sh (script: "openssl x509 -enddate -noout -in ${CONFIG_DIR}/live/${DOMAIN}/cert.pem", returnStdout: true).trim()
           TARGET_HOSTS_APACHE.each { item -> 
             ENDDATE = sh (script: "echo|openssl s_client -servername ${item}.${DOMAIN} -connect ${item}.${DOMAIN}:443 2>/dev/null|openssl x509 -noout -enddate", returnStdout: true).trim()
-//            if (ENDDATE != NEW_ENDDATE) {
+            if (ENDDATE != NEW_ENDDATE) {
               echo "Update certificate and key for ${item}"
               def PLAYBOOK = PKI_GIT_NAME + '/' + DOMAIN + '/wildcard/acme-dns/' + 'apache.yml'
               def TARGET_HOST = item + '.' + DOMAIN
               def TARGET_DIR = WORKSPACE + '/' + CONFIG_DIR
               update_sertificate(PLAYBOOK, TARGET_DIR, TARGET_HOST, DOMAIN)
-//              ap(PLAYBOOK, TARGET_DIR, TARGET_HOST, DOMAIN)
-//            }
+            }
           }
 /*          ENDDATE = sh (script: "echo|openssl s_client -servername ${SMTP_SERVER} -connect ${SMTP_SERVER} 2>/dev/null|openssl x509 -noout -enddate", returnStdout: true).trim()
           if (ENDDATE != NEW_ENDDATE) {