Check prerequisites after sourcing env variables 59/71959/2
authorRihab Banday <rihab.banday@ericsson.com>
Wed, 10 Feb 2021 14:08:10 +0000 (15:08 +0100)
committerRihab Banday <rihab.banday@ericsson.com>
Wed, 3 Mar 2021 11:04:04 +0000 (11:04 +0000)
Env variables should be set before checking the
prerequisites as the check function depends on some
env variables.

Change-Id: I75a4b08d0ef077154924df37a859fc7638744343
Signed-off-by: Rihab Banday <rihab.banday@ericsson.com>
Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/71959
Tested-by: jenkins-ci <jenkins-opnfv-ci@opnfv.org>
Reviewed-by: Michael Pedersen <michaelx.pedersen@intel.com>
deploy.sh
functions.sh

index d817022..def7d95 100755 (executable)
--- a/deploy.sh
+++ b/deploy.sh
@@ -23,15 +23,14 @@ export CURRENTPATH
 
 # shellcheck source=./functions.sh
 source "$CURRENTPATH/functions.sh"
+# shellcheck source=./deploy.env
+source "$CURRENTPATH/deploy.env"
 
 # ---------------------------------------------------------------------
 # check installation and runtime prerequisites
 # ---------------------------------------------------------------------
 check_prerequisites
 
-# shellcheck source=./deploy.env
-source "$CURRENTPATH/deploy.env"
-
 # ---------------------------------------------------------------------
 # creates a virtual environment for installation of dependencies
 # ---------------------------------------------------------------------
index 305dcb7..a446acb 100755 (executable)
@@ -36,7 +36,6 @@ check_prerequisites() {
     #-------------------------------------------------------------------------------
     # Check for DEPLOYMENT type
     #-------------------------------------------------------------------------------
-    DEPLOYMENT=${DEPLOYMENT:-full}
     if ! [[ "$DEPLOYMENT" =~ ^(full|k8s)$ ]]; then
         error "Unsupported value for DEPLOYMENT ($DEPLOYMENT)"
     fi