summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-05-28 21:54:15 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-28 21:54:15 +0000
commit6522316b5704ba2ca30a56240f2d77de6a0869b0 (patch)
tree7bb452e48b0ae85c358743cd07b06b0320d5a99e
parentc0561fbfb0c8a321f3846f6325ec3e1c5bff415c (diff)
parent8cb8fbfdedd419625c6e751f9d19ea27c240e4e2 (diff)
Merge "Add the Release version of PAP as environment variable"
-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}