Commit f07663dd authored by OPS—李 桐's avatar OPS—李 桐

update qgAnsiblePipeline

parent 1e5fb414
...@@ -22,16 +22,16 @@ def call(body) { ...@@ -22,16 +22,16 @@ def call(body) {
} }
stage('Deploy') { stage('Deploy') {
sh "ansible-playbook /etc/ansible/nginx_remove.yml -e project_name=${config.envType}.${projectName} -e data_center=${dataCenter} -e hosts=${hosts} -vv" sh "ansible-playbook /etc/ansible/nginx_remove.yml -e project_name=${config.envType}.${projectName} -e data_center=${dataCenter} -e machines=${hosts} -vv"
env.RELEASE_ACTION = input message: '请选择下一步部署动作', ok: '确认', env.RELEASE_ACTION = input message: '请选择下一步部署动作', ok: '确认',
parameters: [choice(name: 'RELEASE_SCOPE', choices: 'Deploy\nRollback', description: '请谨慎选择你要进行的操作')] parameters: [choice(name: 'RELEASE_SCOPE', choices: 'Deploy\nRollback', description: '请谨慎选择你要进行的操作')]
if (env.RELEASE_ACTION == "Deploy") { if (env.RELEASE_ACTION == "Deploy") {
sh "ansible-playbook /etc/ansible/${action}.yml -e project_name=${config.envType}.${projectName} -e data_center=${dataCenter} -e hosts=${hosts} -vv" sh "ansible-playbook /etc/ansible/${action}.yml -e project_name=${config.envType}.${projectName} -e data_center=${dataCenter} -e machines=${hosts} -vv"
}else{ }else{
sh "ansible-playbook /etc/ansible/nginx_add.yml -e project_name=${config.envType}.${projectName} -e data_center=${dataCenter} -e hosts=${hosts} -vv" sh "ansible-playbook /etc/ansible/nginx_add.yml -e project_name=${config.envType}.${projectName} -e data_center=${dataCenter} -e machines=${hosts} -vv"
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment