Merge pull request 'dev' (#19) from dev into master

Reviewed-on: http://89.110.105.223:8080/IaC/rproxy/pulls/19
This commit is contained in:
2024-09-29 15:26:55 +03:00

11
Jenkinsfile vendored
View File

@@ -11,8 +11,6 @@ pipeline {
parameters { parameters {
string(name: "target_host", defaultValue: "", trim: true, description: "Target host") string(name: "target_host", defaultValue: "", trim: true, description: "Target host")
booleanParam(name: "rproxy_install", defaultValue: true, description: "Install Rproxy") 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") 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_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)") string(name: "rproxy_service_port", defaultValue: "", trim: true, description: "Service port (for 'Add config' job only)")
@@ -26,11 +24,10 @@ pipeline {
} }
} }
steps { steps {
withFileParameter('rootca') { script {
sh 'mv ${rootca} roles/rproxy/files/RootCA.crt' 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'
withFileParameter('rootca_key') { sh 'echo "${ask_for_certs["rootca_key"]}" > roles/rproxy/files/RootCA.key'
sh 'mv ${rootca_key} roles/rproxy/files/RootCA.key'
} }
} }
} }