#!/bin/bash set -o xtrace set -o errexit set -o pipefail # Enable unbuffered output for Ansible in Jenkins. export PYTHONUNBUFFERED=1 function deploy_tenks_logged { . /etc/kolla/admin-openrc.sh echo "Creating IPA images for Ironic" ~/openstackclient-venv/bin/openstack image create --disk-format aki --container-format aki --private \ --file /etc/kolla/config/ironic/ironic-agent.kernel ipa.vmlinuz ~/openstackclient-venv/bin/openstack image create --disk-format ari --container-format ari --private \ --file /etc/kolla/config/ironic/ironic-agent.initramfs ipa.initramfs # Install a trivial script for ovs-vsctl that talks to containerised Open # vSwitch. sudo tee /usr/bin/ovs-vsctl >/dev/null < /tmp/logs/ansible/deploy-tenks 2>&1 result=$? if [[ $result != 0 ]]; then echo "Deploying tenks failed. See ansible/deploy-tenks for details" else echo "Successfully deployed tenks. See ansible/deploy-tenks for details" fi return $result } deploy_tenks $1