Commit ef36f8e6 authored by daidekun's avatar daidekun

fixbugs

parent edb04d9a
...@@ -37,11 +37,12 @@ def call(body) { ...@@ -37,11 +37,12 @@ def call(body) {
echo "Is deploy to :" + machine echo "Is deploy to :" + machine
sh "ansible-playbook /etc/ansible/service.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} -e machines=${machine[0]} -e force=${force} -vv" sh "ansible-playbook /etc/ansible/service.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} -e machines=${machine[0]} -e force=${force} -vv"
/* env.RELEASE_ACTION = input message: '请选择下一步部署动作', ok: '确认', aborted: '取消', env.RELEASE_ACTION = input(
parameters: [choice(name: 'RELEASE_SCOPE', choices: 'Deploy\nRollback', description: '请谨慎选择你要进行的操作')]*/ id: 'action', message: '是否继续?', parameters: [
env.RELEASE_ACTION = input message: '请选择下一步部署动作', ok: '确认', aborted: '取消' [$class: 'BooleanParameterDefinition', defaultValue: true, description: '', name: '请确认是否继续部署?']
])
if (env.RELEASE_ACTION == "Deploy") { if (env.RELEASE_ACTION == true) {
sh "ansible-playbook /etc/ansible/${action}.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} -e machines=${machine[0]} -e force=${force} -vv" sh "ansible-playbook /etc/ansible/${action}.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} -e machines=${machine[0]} -e force=${force} -vv"
}else{ }else{
sh "ansible-playbook /etc/ansible/nginx_add.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} -e machines=${machine[0]} -vv" sh "ansible-playbook /etc/ansible/nginx_add.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} -e machines=${machine[0]} -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