kolla-ansible/tests/deploy.sh
Mark Goddard 1ea99147c1 CI: Use PATH to find kolla-ansible script
This change also updates the CI test scripts to use PATH to find the
kolla-ansible script, rather than relying on the file in the source
checkout.

Using the script in the source checkout was hiding an issue with pip
install --user, although that has now been fixed in
I5b47a146627d06bb3fe4a747c5f20290c726b0f9.

Related-Bug: #1915527

Change-Id: I2827a657c8716a9c40391c6bdb7ff1a2a9c1260e
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/775586
2021-05-25 10:29:12 +01:00

29 lines
1003 B
Bash
Executable File

#!/bin/bash
set -o xtrace
set -o errexit
# Enable unbuffered output for Ansible in Jenkins.
export PYTHONUNBUFFERED=1
function deploy {
RAW_INVENTORY=/etc/kolla/inventory
#TODO(inc0): Post-deploy complains that /etc/kolla is not writable. Probably we need to include become there
sudo chmod -R 777 /etc/kolla
# generate self-signed certificates for the optional internal TLS tests
if [[ "$TLS_ENABLED" = "True" ]]; then
kolla-ansible -i ${RAW_INVENTORY} -vvv certificates > /tmp/logs/ansible/certificates
fi
# Actually do the deployment
kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/deploy-prechecks
kolla-ansible -i ${RAW_INVENTORY} -vvv pull &> /tmp/logs/ansible/pull
kolla-ansible -i ${RAW_INVENTORY} -vvv deploy &> /tmp/logs/ansible/deploy
kolla-ansible -i ${RAW_INVENTORY} -vvv post-deploy &> /tmp/logs/ansible/post-deploy
kolla-ansible -i ${RAW_INVENTORY} -vvv check &> /tmp/logs/ansible/check-deploy
}
deploy