From 24ca3a65295500e0fb77f2bb3481c22c0c1050ad Mon Sep 17 00:00:00 2001
From: David Hoese <david.hoese@ssec.wisc.edu>
Date: Tue, 10 Nov 2020 09:20:52 -0600
Subject: [PATCH] Fix CI_PROJECT_NAMESPACE usage in get_namespace.sh

---
 .gitlab-ci.yml           | 2 +-
 helpers/get_namespace.sh | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3340623..89632f5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,7 +22,7 @@ variables:
   GCP_TAG_REGEX: "^gcp-r[0-9]+_[0-9]+"
 #  TESTS_BRANCH_REGEX: "^master"
   # only run tests for branches in the main repository
-  TESTS_PROJECT_NAME: "cspp_geo/geosphere/geosphere-deploy"
+  TESTS_PROJECT_NAMESPACE: "cspp_geo/geosphere/geosphere-deploy"
   GEOSPHERE_NAMESPACE: "geosphere"
   GEOSPHERE_TEST_NAMESPACE: "geosphere-test"
   GCP_NAMESPACE: "default"
diff --git a/helpers/get_namespace.sh b/helpers/get_namespace.sh
index 9a9acc9..c985814 100755
--- a/helpers/get_namespace.sh
+++ b/helpers/get_namespace.sh
@@ -24,11 +24,11 @@ if [[ -n "$CI_COMMIT_TAG" ]]; then
         debug "gcp tag matched"
         ns="${GCP_NAMESPACE}"
     fi
-elif [[ $CI_PROJECT_NAME =~ $TESTS_PROJECT_NAME ]]; then
-    debug "Tests project name matched"
+elif [[ $CI_PROJECT_NAMESPACE =~ $TESTS_PROJECT_NAMESPACE ]]; then
+    debug "Tests project namespace matched"
     ns="${TESTS_NAMESPACE}"
 else
-    debug "Could not determine namespace | $CI_COMMIT_TAG | $CI_PROJECT_NAME"
+    debug "Could not determine namespace | $CI_COMMIT_TAG | $CI_PROJECT_NAMESPACE"
 fi
 
 if [[ -z $ns ]]; then
-- 
GitLab