Default CSIT to master branch 02/108402/1
authorJim Hahn <jrh3@att.com>
Thu, 28 May 2020 12:55:32 +0000 (08:55 -0400)
committerJim Hahn <jrh3@att.com>
Thu, 28 May 2020 12:57:13 +0000 (08:57 -0400)
Added "defaultbranch=master" to .gitreview file.
Also modified Policy CSITs to get the branch from the .gitreview
file instead of hard-coding it in a config file.

Issue-ID: POLICY-2597
Change-Id: I05e969d3efdaf09c4fca4012131983ca26423ab0
Signed-off-by: Jim Hahn <jrh3@att.com>
.gitreview
scripts/policy/config/policy-csit.conf

index e6c21d1..a7d8b80 100644 (file)
@@ -2,3 +2,4 @@
 host=gerrit.onap.org
 port=29418
 project=integration/csit.git
+defaultbranch=master
index 1858698..95c1450 100644 (file)
@@ -1,3 +1,7 @@
-GERRIT_BRANCH=master
 POLICY_MARIADB_VER=10.2.25
 NEXUS_URL=https://nexus.onap.org/content/repositories/snapshots
+
+GIT_TOP=$(git rev-parse --show-toplevel)
+GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' \
+                    "${GIT_TOP}"/.gitreview)
+echo GERRIT_BRANCH=${GERRIT_BRANCH}