changing procedure
This commit is contained in:
parent
e54816a072
commit
4b9181e44e
|
|
@ -31,7 +31,11 @@ def createCert(domains) {
|
||||||
|
|
||||||
if (fileExists(fileName)) {
|
if (fileExists(fileName)) {
|
||||||
def certInfo = sh(
|
def certInfo = sh(
|
||||||
script: "openssl x509 -in ${fileName} -text -noout | grep -o 'DNS:[^,]*' | sed 's/DNS://g'",
|
script: """
|
||||||
|
openssl x509 -in ${fileName} -text -noout \
|
||||||
|
| grep 'DNS:' \
|
||||||
|
| sed 's/.*DNS://;s/, /\\n/g'
|
||||||
|
""",
|
||||||
returnStdout: true
|
returnStdout: true
|
||||||
).trim()
|
).trim()
|
||||||
|
|
||||||
|
|
@ -82,6 +86,7 @@ def createCert(domains) {
|
||||||
--cert-name='${name}' \
|
--cert-name='${name}' \
|
||||||
--non-interactive --agree-tos \
|
--non-interactive --agree-tos \
|
||||||
--preferred-challenges http \
|
--preferred-challenges http \
|
||||||
|
--expand \
|
||||||
--email ${email} \
|
--email ${email} \
|
||||||
-d ${name} ${subDomains}
|
-d ${name} ${subDomains}
|
||||||
""".stripIndent()
|
""".stripIndent()
|
||||||
|
|
@ -100,10 +105,9 @@ pipeline {
|
||||||
stage('Make https cert for my domains') {
|
stage('Make https cert for my domains') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
|
|
||||||
createCert(domainsToCert)
|
createCert(domainsToCert)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue