fix jenkinsfile
This commit is contained in:
parent
aa6fa836ae
commit
a2811c81ad
6
ansible/Jenkinsfile
vendored
6
ansible/Jenkinsfile
vendored
@ -51,11 +51,11 @@ pipeline {
|
|||||||
def sanitized_content = params.ADDITIONAL_CONTENT.replaceAll("'", "\\'").replaceAll('"', '\\"')
|
def sanitized_content = params.ADDITIONAL_CONTENT.replaceAll("'", "\\'").replaceAll('"', '\\"')
|
||||||
|
|
||||||
if (params.SITE_OPTION == 'SiteA') {
|
if (params.SITE_OPTION == 'SiteA') {
|
||||||
sh "export PATH=/usr/local/bin:\$PATH && ansible-playbook /ansible/playbook.yml -i ${env.HOSTS_FILE} -l SiteA -e \"additional_content='${sanitized_content}'\""
|
sh "export PATH=/usr/local/bin:\$PATH && ansible-playbook ansible/playbook.yml -i ${env.HOSTS_FILE} -l SiteA -e \"additional_content='${sanitized_content}'\""
|
||||||
} else if (params.SITE_OPTION == 'SiteB') {
|
} else if (params.SITE_OPTION == 'SiteB') {
|
||||||
sh "export PATH=/usr/local/bin:\$PATH && ansible-playbook /ansible/playbook.yml -i ${env.HOSTS_FILE} -l SiteB -e \"additional_content='${sanitized_content}'\""
|
sh "export PATH=/usr/local/bin:\$PATH && ansible-playbook ansible/playbook.yml -i ${env.HOSTS_FILE} -l SiteB -e \"additional_content='${sanitized_content}'\""
|
||||||
} else if (params.SITE_OPTION == 'SiteA&B') {
|
} else if (params.SITE_OPTION == 'SiteA&B') {
|
||||||
sh "export PATH=/usr/local/bin:\$PATH && ansible-playbook /ansible/playbook.yml -i ${env.HOSTS_FILE} -l SiteA,SiteB,proxy -e \"additional_content='${sanitized_content}'\""
|
sh "export PATH=/usr/local/bin:\$PATH && ansible-playbook ansible/playbook.yml -i ${env.HOSTS_FILE} -l SiteA,SiteB,proxy -e \"additional_content='${sanitized_content}'\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user