Skip to content

Instantly share code, notes, and snippets.

@larsks
Created May 11, 2016 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larsks/f3733820bac3ff4739b9baf65691b621 to your computer and use it in GitHub Desktop.
Save larsks/f3733820bac3ff4739b9baf65691b621 to your computer and use it in GitHub Desktop.
bash $WORKSPACE/tripleo-quickstart/ci-scripts/get-node.sh
export VIRTHOST=$(head -n1 $WORKSPACE/virthost)
echo $VIRTHOST
pushd $WORKSPACE/tripleo-quickstart
result=0
# (trown) This is so that we ensure seperate ssh sockets for
# concurrent jobs. Without this, two jobs running in parallel
# would try to use the same undercloud-stack socket.
socketdir=$(mktemp -d /tmp/sockXXXXXX)
export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r
bash $WORKSPACE/tripleo-quickstart/quickstart.sh \
--tags all \
--undercloud-image-url "http://artifacts.ci.centos.org/artifacts/rdo/images/master/delorean/testing/undercloud.qcow2" \
--config $WORKSPACE/tripleo-quickstart/playbooks/centosci/minimal.yml \
--working-dir $WORKSPACE/ \
--no-clone \
$VIRTHOST master || result=1
infra_result=0
bash $WORKSPACE/tripleo-quickstart/ci-scripts/collect-logs.sh &> $WORKSPACE/collect_logs.txt || infra_result=1
bash $WORKSPACE/tripleo-quickstart/ci-scripts/return-node.sh &> $WORKSPACE/cleanup.txt || infra_result=2
if [[ "$infra_result" != "0" && "$result" = "0" ]]; then
# if the job/test was ok, but collect_logs/cleanup failed,
# print out why the collect_logs/cleanup failed
cat $WORKSPACE/collect_logs.txt
cat $WORKSPACE/cleanup.txt
fi
exit $result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment