changing procedure
This commit is contained in:
parent
e54816a072
commit
4b9181e44e
|
|
@ -31,7 +31,11 @@ def createCert(domains) {
|
|||
|
||||
if (fileExists(fileName)) {
|
||||
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
|
||||
).trim()
|
||||
|
||||
|
|
@ -82,6 +86,7 @@ def createCert(domains) {
|
|||
--cert-name='${name}' \
|
||||
--non-interactive --agree-tos \
|
||||
--preferred-challenges http \
|
||||
--expand \
|
||||
--email ${email} \
|
||||
-d ${name} ${subDomains}
|
||||
""".stripIndent()
|
||||
|
|
@ -100,10 +105,9 @@ pipeline {
|
|||
stage('Make https cert for my domains') {
|
||||
steps {
|
||||
script {
|
||||
|
||||
createCert(domainsToCert)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue