Skip read if inputs alread defined
Change-Id: If4ca7c9b34a31e104cc0e236e0f062c549a279d9
Issue-ID: INT-278
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
diff --git a/test/ete/labs/windriver/Integration-Jenkins-openrc.sh b/test/ete/labs/windriver/Integration-Jenkins-openrc.sh
index 0b18012..979d8a9 100644
--- a/test/ete/labs/windriver/Integration-Jenkins-openrc.sh
+++ b/test/ete/labs/windriver/Integration-Jenkins-openrc.sh
@@ -32,14 +32,18 @@
# connecting to an HTTPS enabled endpoint
CERT_MSG="Please enter a path for your CA certificate pem file, \
or press enter if you are not using HTTPS "
-read -p "$CERT_MSG" OS_CACERT_INPUT
+if [ -z ${OS_CACERT_INPUT+x} ]; then
+ read -p "$CERT_MSG" OS_CACERT_INPUT
+fi
if [ ! -z "$OS_CACERT_INPUT" ]
then
export OS_CACERT=$(readlink -f $OS_CACERT_INPUT)
fi
# With Keystone you pass the keystone password.
-read -sp "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: " OS_PASSWORD_INPUT
+if [ -z ${OS_PASSWORD_INPUT+x} ]; then
+ read -sp "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: " OS_PASSWORD_INPUT
+fi
export OS_PASSWORD=$OS_PASSWORD_INPUT
# If your configuration has multiple regions, we set that information here.