Commit 4f26246c authored by tong.li's avatar tong.li

deploy

parent 506a92ff
......@@ -32,22 +32,7 @@ def call(body) {
stage('Deploy') {
if (action == 'deploy') {
echo 'deploy'
arr_machines = machines.split(",")
count = arr_machines.size()
int_count = (count / 2).toInteger()
machines_list = _utils.partList(arr_machines.toList(), int_count, count)
c = 0
for (machine in machines_list) {
echo "Is deploy to :" + machine
sh "ansible-playbook /etc/ansible/${action}.yml -e project_name=${projectName} -e data_center=${dataCenter} -e machines=${machine[0]} -e tag_name=${tagName} -e force=${force} -e env=${envType} -e tingyun=${tingyun} -v"
c = c + 1
if (c < count) {
env.RELEASE_ACTION = input '是否继续部署?'
}
}
sh "ansible-playbook /etc/ansible/${action}.yml -e project_name=${projectName} -e data_center=${dataCenter} -e machines=${machine[0]} -e tag_name=${tagName} -e force=${force} -e env=${envType} -e tingyun=${tingyun} -v"
}
if (action == 'rollback') {
......
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