Clean up microbrow.sh and add better error handling
adds set -eu to exit on undefined variable usage. avoids exporting every variable. Also adds case for downstream out of pipeline jobs that should fix them. Change-Id: I588c6def5bd9d51f3b5c6fa2a8a8557d451e2086
This commit is contained in:
parent
d119dd43cb
commit
4be103b8b9
@ -1,13 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -eu
|
||||||
|
|
||||||
export OPT_DEBUG_ANSIBLE=1
|
OPT_DEBUG_ANSIBLE=1
|
||||||
export USER=root
|
USER=root
|
||||||
export HW_ENV_DIR=$WORKSPACE/tripleo-environments/hardware_environments/$HW_ENV
|
HW_ENV_DIR=$WORKSPACE/tripleo-environments/hardware_environments/$HW_ENV
|
||||||
export NETWORK_ISOLATION=no_vlan
|
NETWORK_ISOLATION=no_vlan
|
||||||
export REQS=quickstart-extras-requirements.txt
|
REQS=quickstart-extras-requirements.txt
|
||||||
export PLAYBOOK=baremetal-virt-undercloud-tripleo-browbeat.yml
|
PLAYBOOK=baremetal-virt-undercloud-tripleo-browbeat.yml
|
||||||
export RELEASE=$RELEASE
|
VARS="elastic_enabled_template=true \
|
||||||
export VARS="elastic_enabled_template=true \
|
|
||||||
--extra-vars graphite_enabled_template=true \
|
--extra-vars graphite_enabled_template=true \
|
||||||
--extra-vars elastic_host_template=$ELASTIC_HOST \
|
--extra-vars elastic_host_template=$ELASTIC_HOST \
|
||||||
--extra-vars graphite_host_template=$GRAPH_HOST \
|
--extra-vars graphite_host_template=$GRAPH_HOST \
|
||||||
@ -26,7 +26,12 @@ if [ ! -z ${current_build+x} ]
|
|||||||
source $WORKSPACE/tripleo-environments/ci-scripts/internal-functions.sh
|
source $WORKSPACE/tripleo-environments/ci-scripts/internal-functions.sh
|
||||||
hash=$(get_delorean_hash_from_url $current_build)
|
hash=$(get_delorean_hash_from_url $current_build)
|
||||||
cached_image="$INTERNAL_IMAGE_SERVER/$RELEASE/delorean/$hash/undercloud.qcow2"
|
cached_image="$INTERNAL_IMAGE_SERVER/$RELEASE/delorean/$hash/undercloud.qcow2"
|
||||||
export VARS='$VARS --extra-vars undercloud_image_url=$cached_image --extra-vars dlrn_hash=$hash'
|
VARS='$VARS --extra-vars undercloud_image_url=$cached_image --extra-vars dlrn_hash=$hash'
|
||||||
|
|
||||||
|
#If we are not in the pipeline downstream builds need to use current-passed-ci
|
||||||
|
elif [[ $RELEASE == *rhos-* ]]
|
||||||
|
then
|
||||||
|
RELEASE="$RELEASE-current-passed-ci"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user