summaryrefslogtreecommitdiffstats
path: root/csit/detmVers.sh
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-04-08 15:28:15 -0400
committerJim Hahn <jrh3@att.com>2021-04-08 16:05:49 -0400
commitcfc44f03869b13373946f6f76adc00e5a0539abb (patch)
tree50960315236dc4aea6eeb9ada3ca3040762dfda2 /csit/detmVers.sh
parent516b0a8287a70500e1c68c13afb264d20af5efeb (diff)
Use github in lieu of gerrit mirror
The gerrit mirror is not always accessible behind corporate firewalls, thus changed the CSITs to use github instead. Also modified the script to only clone ci-management to /tmp if it does not already exist. Issue-ID: POLICY-3179 Change-Id: I9cac98b04e000d9365e05a1f2ca1c328fef14c6c Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'csit/detmVers.sh')
-rw-r--r--csit/detmVers.sh49
1 files changed, 17 insertions, 32 deletions
diff --git a/csit/detmVers.sh b/csit/detmVers.sh
index 1906292c..56e516c7 100644
--- a/csit/detmVers.sh
+++ b/csit/detmVers.sh
@@ -20,58 +20,43 @@ source ${SCRIPTS}/get-branch-mariadb.sh
echo POLICY_MARIADB_VER=${POLICY_MARIADB_VER}
-POLICY_MODELS_VERSION=$(
- curl -q --silent \
- https://git.onap.org/policy/models/plain/pom.xml?h=${GERRIT_BRANCH} |
- xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+function getVersion
+{
+ REPO=$1
+ curl -qL --silent \
+ https://github.com/onap/policy-$REPO/raw/${GERRIT_BRANCH}/pom.xml |
+ xmllint --xpath \
+ '/*[local-name()="project"]/*[local-name()="version"]/text()' -
+}
+
+POLICY_MODELS_VERSION=$(getVersion models)
export POLICY_MODELS_VERSION=${POLICY_MODELS_VERSION:0:3}-SNAPSHOT-latest
echo POLICY_MODELS_VERSION=${POLICY_MODELS_VERSION}
-POLICY_API_VERSION=$(
- curl -q --silent \
- https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} |
- xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+POLICY_API_VERSION=$(getVersion api)
export POLICY_API_VERSION=${POLICY_API_VERSION:0:3}-SNAPSHOT-latest
echo POLICY_API_VERSION=${POLICY_API_VERSION}
-POLICY_PAP_VERSION=$(
- curl -q --silent \
- https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} |
- xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+POLICY_PAP_VERSION=$(getVersion pap)
export POLICY_PAP_VERSION=${POLICY_PAP_VERSION:0:3}-SNAPSHOT-latest
echo POLICY_PAP_VERSION=${POLICY_PAP_VERSION}
-POLICY_XACML_PDP_VERSION=$(
- curl -q --silent \
- https://git.onap.org/policy/xacml-pdp/plain/pom.xml?h=${GERRIT_BRANCH} |
- xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+POLICY_XACML_PDP_VERSION=$(getVersion xacml-pdp)
export POLICY_XACML_PDP_VERSION=${POLICY_XACML_PDP_VERSION:0:3}-SNAPSHOT-latest
echo POLICY_XACML_PDP_VERSION=${POLICY_XACML_PDP_VERSION}
-POLICY_DROOLS_VERSION=$(
- curl -q --silent \
- https://git.onap.org/policy/drools-pdp/plain/pom.xml?h=${GERRIT_BRANCH} |
- xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+POLICY_DROOLS_VERSION=$(getVersion drools-pdp)
export POLICY_DROOLS_VERSION=${POLICY_DROOLS_VERSION:0:3}-SNAPSHOT-latest
echo POLICY_DROOLS_VERSION=${POLICY_DROOLS_VERSION}
-POLICY_DROOLS_APPS_VERSION=$(
- curl -q --silent \
- https://git.onap.org/policy/drools-applications/plain/pom.xml?h=${GERRIT_BRANCH} |
- xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+POLICY_DROOLS_APPS_VERSION=$(getVersion drools-applications)
export POLICY_DROOLS_APPS_VERSION=${POLICY_DROOLS_APPS_VERSION:0:3}-SNAPSHOT-latest
echo POLICY_DROOLS_APPS_VERSION=${POLICY_DROOLS_APPS_VERSION}
-POLICY_APEX_PDP_VERSION=$(
- curl -q --silent \
- https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} |
- xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+POLICY_APEX_PDP_VERSION=$(getVersion apex-pdp)
export POLICY_APEX_PDP_VERSION=${POLICY_APEX_PDP_VERSION:0:3}-SNAPSHOT-latest
echo POLICY_APEX_PDP_VERSION=${POLICY_APEX_PDP_VERSION}
-POLICY_DISTRIBUTION_VERSION=$(
- curl -q --silent \
- https://git.onap.org/policy/distribution/plain/pom.xml?h=${GERRIT_BRANCH} |
- xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+POLICY_DISTRIBUTION_VERSION=$(getVersion distribution)
export POLICY_DISTRIBUTION_VERSION=${POLICY_DISTRIBUTION_VERSION:0:3}-SNAPSHOT-latest
echo POLICY_DISTRIBUTION_VERSION=${POLICY_DISTRIBUTION_VERSION}