Commit e2390bf6 authored by daidekun's avatar daidekun

fixbugs

parent 6db930e6
...@@ -37,17 +37,16 @@ def call(body) { ...@@ -37,17 +37,16 @@ def call(body) {
machines_list = _utils.partList(arr_machines.toList(), int_count, count) machines_list = _utils.partList(arr_machines.toList(), int_count, count)
for (machine in machines_list) { for (machine in machines_list) {
print machine[0] sh "ansible-playbook /etc/ansible/nginx_remove.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} -e machines=${machine[0]} -vv"
sh "ansible-playbook /etc/ansible/nginx_remove.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} -e machines=${machine} -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=${envType}.${projectName} -e data_center=${dataCenter} machines=${machine} -vv" sh "ansible-playbook /etc/ansible/${action}.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} machines=${machine[0]} -vv"
}else{ }else{
sh "ansible-playbook /etc/ansible/nginx_add.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} machines=${machine} -vv" sh "ansible-playbook /etc/ansible/nginx_add.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} 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