Commit 32d89b49 authored by daidekun's avatar daidekun

fix

parent 2742cb02
...@@ -33,11 +33,9 @@ def call(body) { ...@@ -33,11 +33,9 @@ def call(body) {
stage('Deploy') { stage('Deploy') {
arr_machines = machines.split(",") arr_machines = machines.split(",")
count = arr_machines.size() count = arr_machines.size()
int_count = count / 2 int_count = (count / 2).toInteger()
print int_count
machines_list = _utils.partition(arr_machines, int_count) machines_list = _utils.partition(arr_machines, int_count)
echo machines_list print machines_list
for (machine in machines_list) { for (machine in machines_list) {
sh "ansible-playbook /etc/ansible/nginx_remove.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} -e machines=${machine} -vv" sh "ansible-playbook /etc/ansible/nginx_remove.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} -e machines=${machine} -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