Update cleanup script to match new naming

Commit 1ae2c8c52e27d92708c422b8630c53a199eee1ac
changed the stack and related resources naming convention
to match that of te-broker.

This review updates the clean up script to use
that new naming convention.

Change-Id: I4ba5c58aabdcace5c75003316d6bc659411d7b58
This commit is contained in:
Ronelle Landy 2018-03-19 12:26:45 -04:00
parent 442913400d
commit f4f0b10fac
1 changed files with 6 additions and 6 deletions

View File

@ -9,19 +9,19 @@ set -eux
OVB_CREDS_FILE=$1
PLAYBOOK=$2
# env file is named <prefix>env.yaml
# prefix is built from:
# "{{ 1000 |random }}"-"{{ lookup('env', 'USER') }}"-"{{ lookup('env', 'BUILD_NUMBER') }}"-
# env file is named env-{{ idnum }}.yaml
# idnum is built from:
# "{{ 100000 |random }}"
export PREFIX=$(ls $WORKSPACE | grep -h env.yaml | sed -n -e 's/env.yaml//p')
echo $PREFIX
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 prefix=$PREFIX \
--extra-vars idnum=$IDNUM \
--extra-vars @$OVB_CREDS_FILE \
--playbook $PLAYBOOK \
localhost