From 421e21bde234f78bc75ba2ea463d48210530dcf3 Mon Sep 17 00:00:00 2001 From: mpavlov Date: Thu, 3 Oct 2024 21:28:17 +0300 Subject: [PATCH] test userinput --- Jenkinsfile | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e6afa05..2243f7c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,16 +25,10 @@ pipeline { // } steps { script { - env.AskCerts = input message: 'Upload RootCA certificate and key', parameters: [base64File(name: 'rootca'), base64File(name: 'rootca_key')] - // RootCA = AskCerts[rootca] - sh 'echo ${env.AskCerts["rootca"]} | base64 -d > roles/rproxy/files/RootCA.crt' + def userInput = input message: 'Upload RootCA certificate and key', parameters: [base64File(name: 'rootca'), base64File(name: 'rootca_key')] + writeFile(file: 'roles/rproxy/files/RootCA.crt', text: new String(userInput['rootca'].decodeBase64())) + writeFile(file: 'roles/rproxy/files/RootCA.key', text: new String(userInput['rootca_key'].decodeBase64())) sh 'cat roles/rproxy/files/RootCA.crt' - - // def rootca_key = AskCerts['rootca_key'] - - - // sh 'echo "${ask_for_certs["rootca"]}" > roles/rproxy/files/RootCA.crt' - // sh 'echo "${ask_for_certs["rootca_key"]}" > roles/rproxy/files/RootCA.key' } } }