bifrost: scripts: bifrost-provision.sh: Set defaults for Ironic variables 91/52291/1
authorMarkos Chandras <mchandras@suse.de>
Mon, 19 Feb 2018 10:29:48 +0000 (10:29 +0000)
committerMarkos Chandras <mchandras@suse.de>
Mon, 19 Feb 2018 10:29:48 +0000 (10:29 +0000)
When running the bifrost jobs for the OPNFV 3rd Party CI, the Ironic
variables are not defined and we get the following error:

./scripts/bifrost-provision.sh: line 112: BIFROST_IRONIC_INSPECTOR_VERSION: unbound variable

As such, we need to provide reasonable defaults when we are running this
script outside of XCI.

Change-Id: I9cc3ae1b70494637a85558b9cae99fc1eeaebc74
Signed-off-by: Markos Chandras <mchandras@suse.de>
bifrost/scripts/bifrost-provision.sh

index bc2d36b..4de2ad2 100755 (executable)
@@ -22,6 +22,11 @@ PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-3600}
 # This is normally exported by XCI env but we should initialize it here
 # in case we run this script on its own for debug purposes
 XCI_ANSIBLE_VERBOSITY=${XCI_ANSIBLE_VERBOSITY:-}
+# Ironic SHAs
+BIFROST_IRONIC_INSPECTOR_VERSION=${BIFROST_IRONIC_INSPECTOR_VERSION:-master}
+BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION=${BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION:-master}
+BIFROST_IRONIC_CLIENT_VERSION=${BIFROST_IRONIC_CLIENT_VERSION:-master}
+BIFROST_IRONIC_VERSION=${BIFROST_IRONIC_VERSION:-master}
 
 # Ensure the right inventory files is used based on branch
 CURRENT_BIFROST_BRANCH=$(git rev-parse --abbrev-ref HEAD)