summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2021-10-19 12:38:04 +0100
committera.sreekumar <ajith.sreekumar@bell.ca>2021-10-19 12:38:09 +0100
commitd00369a9bdc26c22c3582b7759dcb87be6352649 (patch)
tree50767e1e11dc175ecf56ab11b27fa94a76ab8613
parent1352e00c93f6cf1ae1cd694897a83139d8ffe625 (diff)
Fixing the version fetch problem in Policy CSITs
The script that fetches the latest version in policy-docker/csit currently support only the image versions in format: <1 digit major version>.<1 digit minor version>-SNAPSHOT-latest But this started failing now as drool jakarta version is "1.10.0". This is fixed. Change-Id: I1cba3beaa00628ec435f2aaef527a7f6318193bf Issue-ID: POLICY-3749 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
-rw-r--r--csit/detmVers.sh34
1 files changed, 13 insertions, 21 deletions
diff --git a/csit/detmVers.sh b/csit/detmVers.sh
index ba72c620..13e8fbe6 100644
--- a/csit/detmVers.sh
+++ b/csit/detmVers.sh
@@ -1,6 +1,7 @@
# ============LICENSE_START====================================================
# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
# Modification Copyright 2021. Nordix Foundation.
+# Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
# =============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -27,45 +28,36 @@ function getVersion
curl -qL --silent \
https://github.com/onap/policy-$REPO/raw/${GERRIT_BRANCH}/pom.xml |
xmllint --xpath \
- '/*[local-name()="project"]/*[local-name()="version"]/text()' -
+ '/*[local-name()="project"]/*[local-name()="version"]/text()' - |
+ awk -F \. '{print $1"."$2"-SNAPSHOT-latest"}'
}
-POLICY_MODELS_VERSION=$(getVersion models)
-export POLICY_MODELS_VERSION=${POLICY_MODELS_VERSION:0:3}-SNAPSHOT-latest
+export POLICY_MODELS_VERSION=$(getVersion models)
echo POLICY_MODELS_VERSION=${POLICY_MODELS_VERSION}
-POLICY_API_VERSION=$(getVersion api)
-export POLICY_API_VERSION=${POLICY_API_VERSION:0:3}-SNAPSHOT-latest
+export POLICY_API_VERSION=$(getVersion api)
echo POLICY_API_VERSION=${POLICY_API_VERSION}
-POLICY_PAP_VERSION=$(getVersion pap)
-export POLICY_PAP_VERSION=${POLICY_PAP_VERSION:0:3}-SNAPSHOT-latest
+export POLICY_PAP_VERSION=$(getVersion pap)
echo POLICY_PAP_VERSION=${POLICY_PAP_VERSION}
-POLICY_XACML_PDP_VERSION=$(getVersion xacml-pdp)
-export POLICY_XACML_PDP_VERSION=${POLICY_XACML_PDP_VERSION:0:3}-SNAPSHOT-latest
+export POLICY_XACML_PDP_VERSION=$(getVersion xacml-pdp)
echo POLICY_XACML_PDP_VERSION=${POLICY_XACML_PDP_VERSION}
-POLICY_DROOLS_VERSION=$(getVersion drools-pdp)
-export POLICY_DROOLS_VERSION=${POLICY_DROOLS_VERSION:0:3}-SNAPSHOT-latest
+export POLICY_DROOLS_VERSION=$(getVersion drools-pdp)
echo POLICY_DROOLS_VERSION=${POLICY_DROOLS_VERSION}
-POLICY_DROOLS_APPS_VERSION=$(getVersion drools-applications)
-export POLICY_DROOLS_APPS_VERSION=${POLICY_DROOLS_APPS_VERSION:0:3}-SNAPSHOT-latest
+export POLICY_DROOLS_APPS_VERSION=$(getVersion drools-applications)
echo POLICY_DROOLS_APPS_VERSION=${POLICY_DROOLS_APPS_VERSION}
-POLICY_APEX_PDP_VERSION=$(getVersion apex-pdp)
-export POLICY_APEX_PDP_VERSION=${POLICY_APEX_PDP_VERSION:0:3}-SNAPSHOT-latest
+export POLICY_APEX_PDP_VERSION=$(getVersion apex-pdp)
echo POLICY_APEX_PDP_VERSION=${POLICY_APEX_PDP_VERSION}
-POLICY_DISTRIBUTION_VERSION=$(getVersion distribution)
-export POLICY_DISTRIBUTION_VERSION=${POLICY_DISTRIBUTION_VERSION:0:3}-SNAPSHOT-latest
+export POLICY_DISTRIBUTION_VERSION=$(getVersion distribution)
echo POLICY_DISTRIBUTION_VERSION=${POLICY_DISTRIBUTION_VERSION}
-POLICY_CLAMP_VERSION=$(getVersion clamp)
-export POLICY_CLAMP_VERSION=${POLICY_CLAMP_VERSION:0:5}-SNAPSHOT-latest
+export POLICY_CLAMP_VERSION=$(getVersion clamp)
echo POLICY_CLAMP_VERSION=${POLICY_CLAMP_VERSION}
-POLICY_DOCKER_VERSION=$(getVersion docker)
-export POLICY_DOCKER_VERSION=${POLICY_DOCKER_VERSION:0:3}-SNAPSHOT-latest
+export POLICY_DOCKER_VERSION=$(getVersion docker)
echo POLICY_DOCKER_VERSION=${POLICY_DOCKER_VERSION}