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

deploy

parent a34128af
......@@ -24,11 +24,12 @@ def call(body) {
}
stage('Build') {
/* sh "ansible-playbook /etc/ansible/build.yml -e project_name=${envType}.${projectName} -e name_with_namespace=${nameWithNamespace} -e tag_name=${tagName} -e force=${force} -vv"
*/ }
if (action == 'deploy') {
sh "ansible-playbook /etc/ansible/build.yml -e project_name=${envType}.${projectName} -e name_with_namespace=${nameWithNamespace} -e tag_name=${tagName} -e force=${force} -vv"
}
}
stage('Deploy') {
if (action == 'deploy') {
echo 'deploy'
arr_machines = machines.split(",")
......@@ -46,10 +47,8 @@ def call(body) {
}
if (action == 'rollback') {
echo 'rollback'
sh "ansible-playbook /etc/ansible/${action}.yml -e project_name=${envType}.${projectName} -e data_center=${dataCenter} -e machines=${machine[0]} -e rollback_to_release=${tag_name} -e force=${force} -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