diff --git a/Jenkinsfile b/Jenkinsfile index c8d20a6..78ca34f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,8 +11,6 @@ pipeline { parameters { string(name: "target_host", defaultValue: "", trim: true, description: "Target host") booleanParam(name: "rproxy_install", defaultValue: true, description: "Install Rproxy") - base64File(name: "rootca", description: "RootCA (only for 'Install Rproxy')") - base64File(name: "rootca_key", description: "RootCA key (only for 'Install Rproxy')") booleanParam(name: "config_add", defaultValue: true, description: "Add config") string(name: "rproxy_service_name", defaultValue: "", trim: true, description: "Service name (for 'Add config' job only)") string(name: "rproxy_service_port", defaultValue: "", trim: true, description: "Service port (for 'Add config' job only)") @@ -26,11 +24,10 @@ pipeline { } } steps { - withFileParameter('rootca') { - sh 'mv ${rootca} roles/rproxy/files/RootCA.crt' - } - withFileParameter('rootca_key') { - sh 'mv ${rootca_key} roles/rproxy/files/RootCA.key' + script { + def ask_for_certs = input message: 'Upload RootCA certificate and key', parameters: [base64File(name: 'rootca'), base64File(name: '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' } } }