summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraditya.puthuparambil <aditya.puthuparambil@est.tech>2020-05-27 16:54:56 +0100
committeraditya.puthuparambil <aditya.puthuparambil@est.tech>2020-05-28 17:56:55 +0100
commit8cb8fbfdedd419625c6e751f9d19ea27c240e4e2 (patch)
treeb801c2c3bd9dd5c2fee78ffb5f987e0811e40140
parentbf0f6110ce864b74b25df8df4e1f239fbf049457 (diff)
Add the Release version of PAP as environment variable
Issue-ID: POLICY-2544 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech> Change-Id: Ia9d33b721dab87b91896612e6efcf65378a5c0ff
-rw-r--r--testsuites/stability/src/main/resources/papsetup/setup_pap.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/testsuites/stability/src/main/resources/papsetup/setup_pap.sh b/testsuites/stability/src/main/resources/papsetup/setup_pap.sh
index 235728aa..0f06ed69 100644
--- a/testsuites/stability/src/main/resources/papsetup/setup_pap.sh
+++ b/testsuites/stability/src/main/resources/papsetup/setup_pap.sh
@@ -31,4 +31,8 @@ else
echo "MariaDB IP: ${MARIADB}"
fi
-docker run -p 9090:9090 -p 6969:6969 -e "PAP_HOST=${PAP}" -v ${DIR}/config/pap/bin/policy-pap.sh:/opt/app/policy/pap/bin/policy-pap.sh -v ${DIR}/config/pap/etc/defaultConfig.json:/opt/app/policy/pap/etc/defaultConfig.json --add-host mariadb:${MARIADB} --name policy-pap -d --rm nexus3.onap.org:10001/onap/policy-pap:2.2-SNAPSHOT-latest
+GIT_TOP=$(git rev-parse --show-toplevel)
+POLICY_PAP_VERSION_EXTRACT=$(xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' "${GIT_TOP}"/pom.xml)
+PAP_IMAGE=policy-pap:${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest
+
+docker run -p 9090:9090 -p 6969:6969 -e "PAP_HOST=${PAP}" -v ${DIR}/config/pap/bin/policy-pap.sh:/opt/app/policy/pap/bin/policy-pap.sh -v ${DIR}/config/pap/etc/defaultConfig.json:/opt/app/policy/pap/etc/defaultConfig.json --add-host mariadb:${MARIADB} --name policy-pap -d nexus3.onap.org:10001/onap/${PAP_IMAGE}