Pull correct docker images for master branch
[integration/csit.git] / plans / policy / drools-applications / setup.sh
index 24422a6..e2ca789 100755 (executable)
 #
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
+source ${SCRIPTS}/policy/config/policy-csit.conf
+export POLICY_MARIADB_VER
+echo ${GERRIT_BRANCH}
+echo ${POLICY_MARIADB_VER}
 
 echo "Uninstall docker-py and reinstall docker."
 pip uninstall -y docker-py
 pip uninstall -y docker
 pip install -U docker==2.7.0
 
+sudo apt-get -y install libxml2-utils
+export 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()' -)"
+echo ${POLICY_DRROLS_APPS_VERSION}
+
 docker login -u docker -p docker nexus3.onap.org:10001
 
 # Adding this waiting container to avoid race condition between api and mariadb containers.