tripleo-quickstart/ci-scripts/cleanup-stack-image-ovb.sh
Sorin Sbarnea 4a41ca7bf0 Lint fixes for ci-scripts and config folders
This normalizes the formatting of files from ci-scripts and config
folders in order to allow further hardening of linting.

Fixing linting was too big to be made in a single commit as it would
involve too many files to review and could merge conflicts with
existing changes. Thus doing it in few chunks would makes it possible.

Original full change is at https://review.openstack.org/#/c/627545/ and
will be the one merging the last.

Change-Id: Ifb215c0e2ea0ef7115897721f75ba8489bd59b97
2018-12-28 10:01:11 +00:00

29 lines
606 B
Bash
Executable File

#!/bin/bash
# CI test that cleans up a deploy and image on Openstack Virtual Baremetal.
# Usage: cleanup-stack-image-ovb.sh \
# <ovb-creds-file> \
# <playbook>
set -eux
OVB_CREDS_FILE=$1
PLAYBOOK=$2
# env file is named env-{{ idnum }}.yaml
# idnum is built from:
# "{{ 100000 |random }}"
export IDNUM=$(ls $WORKSPACE | grep -h 'env-.*\.yaml' | sed -e 's/env-\(.*\).yaml/\1/')
echo $IDNUM
pushd $WORKSPACE/tripleo-quickstart
bash quickstart.sh \
--bootstrap \
--working-dir $WORKSPACE/ \
--extra-vars idnum=$IDNUM \
--extra-vars @$OVB_CREDS_FILE \
--playbook $PLAYBOOK \
localhost
popd