Merge pull request 'Auto pull root certificate and key from Jenkins vault' (#33) from dev into master
Reviewed-on: https://remvpn.olssonul.com/IaC/rproxy/pulls/33
This commit is contained in:
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@@ -41,9 +41,13 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def userInput = input message: 'Upload RootCA certificate and key', parameters: [base64File(name: 'rootca'), base64File(name: 'rootca_key')]
|
withCredentials([
|
||||||
writeFile(file: 'roles/rproxy/files/RootCA.crt', text: new String(userInput['rootca'].decodeBase64()))
|
file(credentialsId: "ROOTCA_CERT", variable: "rootca"),
|
||||||
writeFile(file: 'roles/rproxy/files/RootCA.key', text: new String(userInput['rootca_key'].decodeBase64()))
|
file(credentialsId: "ROOTCA_KEY", variable: "rootca_key")
|
||||||
|
]) {
|
||||||
|
sh(script: "cp ${rootca} roles/gitlab/files/RootCA.crt", returnStdout: false)
|
||||||
|
sh(script: "cp ${rootca_key} roles/gitlab/files/RootCA.key", returnStdout: false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user