X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=plans%2Fpolicy%2Fxacml-pdp%2Fsetup.sh;h=a5b6be4344b2dbb13929fcc7e064c647c9f4b83c;hb=c5fc0e448929f393941870cf071f3f1f54c4604c;hp=5036586fd7ab16b16ebc2088da760d4ad3a172cf;hpb=4f4849dc9bd3b584e564ccd83651607941f2a95e;p=integration%2Fcsit.git diff --git a/plans/policy/xacml-pdp/setup.sh b/plans/policy/xacml-pdp/setup.sh index 5036586f..a5b6be43 100644 --- a/plans/policy/xacml-pdp/setup.sh +++ b/plans/policy/xacml-pdp/setup.sh @@ -17,6 +17,9 @@ # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= +GERRIT_BRANCH=$(cat ${SCRIPTS}/policy/config/policy-csit.conf | cut -d "=" -f2) +echo $GERRIT_BRANCH + echo "Uninstall docker-py and reinstall docker." pip uninstall -y docker-py pip uninstall -y docker @@ -50,7 +53,7 @@ ${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn -v cd .. git clone http://gerrit.onap.org/r/oparent -git clone --depth 1 https://gerrit.onap.org/r/policy/models -b dublin +git clone --depth 1 https://gerrit.onap.org/r/policy/models -b $GERRIT_BRANCH cd models/models-sim/models-sim-dmaap ${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn clean install -DskipTests --settings ${WORK_DIR}/oparent/settings.xml bash ./src/main/package/docker/docker_build.sh @@ -58,6 +61,16 @@ cd ${WORKSPACE} rm -rf ${WORK_DIR} sleep 3 + + +sudo apt-get -y install libxml2-utils +export POLICY_API_VERSION="$(curl --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_PAP_VERSION="$(curl --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_XACML_PDP_VERSION="$(curl --silent https://git.onap.org/policy/xacml-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" + +echo $POLICY_API_VERSION +echo $POLICY_PAP_VERSION +echo $POLICY_XACML_PDP_VERSION # Adding this waiting container due to race condition between pap and mariadb docker-compose -f ${WORKSPACE}/scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml run --rm start_dependencies