|
@@ -76,7 +76,7 @@ pipeline {
|
|
*/ stage("Update certificate and key") {
|
|
*/ stage("Update certificate and key") {
|
|
steps {
|
|
steps {
|
|
script {
|
|
script {
|
|
-// Следующие 2 строчки после тестирования необходимо убрать, так как репозитории клонируются в предыдущем шаге
|
|
|
|
|
|
+// Следующие 2 строчки после тестирования необходимо убрать, так как репозитории клонируются в 2 stage
|
|
git_clone(PKI_GIT_URL)
|
|
git_clone(PKI_GIT_URL)
|
|
git_clone(SWARM_GIT_URL)
|
|
git_clone(SWARM_GIT_URL)
|
|
NEW_ENDDATE = sh (script: "openssl x509 -enddate -noout -in ${CONFIG_DIR}/live/${DOMAIN}/cert.pem", returnStdout: true).trim()
|
|
NEW_ENDDATE = sh (script: "openssl x509 -enddate -noout -in ${CONFIG_DIR}/live/${DOMAIN}/cert.pem", returnStdout: true).trim()
|
|
@@ -90,14 +90,14 @@ pipeline {
|
|
update_sertificate(PLAYBOOK, TARGET_DIR, TARGET_HOST, DOMAIN)
|
|
update_sertificate(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()
|
|
|
|
|
|
+ ENDDATE = sh (script: "echo|openssl s_client -servername ${SMTP_SERVER} -connect ${SMTP_SERVER}: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 ${SMTP_SERVER}"
|
|
echo "Update certificate and key for ${SMTP_SERVER}"
|
|
- sh "cat ${PKI_GIT_NAME}/${DOMAIN}/acme-dns/letsencrypt.ca.pem >> ${CONFIG_DIR}/live/${DOMAIN}/fullchain.pem"
|
|
|
|
- def PLAYBOOK = PKI_GIT_NAME + '/' + DOMAIN + '/wildcard/acme-dns/' + 'mail.yml'
|
|
|
|
- update_sertificate(PLAYBOOK, CONFIG_DIR, SMTP_SERVER)
|
|
|
|
|
|
+ sh "cat ${PKI_GIT_NAME}/${DOMAIN}/wildcard/acme-dns/letsencrypt.ca.pem >> ${CONFIG_DIR}/live/${DOMAIN}/fullchain.pem"
|
|
|
|
+ PLAYBOOK = PKI_GIT_NAME + '/' + DOMAIN + '/wildcard/acme-dns/' + 'mail.yml'
|
|
|
|
+ update_sertificate(PLAYBOOK, TARGET_DIR, SMTP_SERVER, DOMAIN)
|
|
}
|
|
}
|
|
-*/ }
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|