Commit f130ad9a authored by tong.li's avatar tong.li

deploy

parent f6cf6ca4
...@@ -26,7 +26,7 @@ def call(body) { ...@@ -26,7 +26,7 @@ def call(body) {
stage('Build') { stage('Build') {
if (action == 'deploy') { if (action == 'deploy') {
sh "ansible-playbook /etc/ansible/build.yml -e project_name=${projectName} -e data_center=${dataCenter} -e name_with_namespace=${nameWithNamespace} -e tag_name=${tagName} -e force=${force} -e env=${envType} -e tingyun=${tingyun} -vv" sh "ansible-playbook /etc/ansible/build.yml -e project_name=${projectName} -e data_center=${dataCenter} -e name_with_namespace=${nameWithNamespace} -e tag_name=${tagName} -e force=${force} -e env=${envType} -e tingyun=${tingyun} -v"
} }
} }
...@@ -41,7 +41,7 @@ def call(body) { ...@@ -41,7 +41,7 @@ def call(body) {
c = 0 c = 0
for (machine in machines_list) { for (machine in machines_list) {
echo "Is deploy to :" + machine 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} -vv" 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 c = c + 1
if (c < count) { if (c < count) {
...@@ -51,7 +51,7 @@ def call(body) { ...@@ -51,7 +51,7 @@ def call(body) {
} }
if (action == 'rollback') { if (action == 'rollback') {
sh "ansible-playbook /etc/ansible/${action}.yml -e project_name=${projectName} -e data_center=${dataCenter} -e machines=${machines} -e rollback_to_release=${tag_name} -e force=${force} -e env=${envType} -e tingyun=${tingyun} -vv" sh "ansible-playbook /etc/ansible/${action}.yml -e project_name=${projectName} -e data_center=${dataCenter} -e machines=${machines} -e rollback_to_release=${tag_name} -e force=${force} -e env=${envType} -e tingyun=${tingyun} -v"
} }
} }
} }
......
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