From c5fc0e448929f393941870cf071f3f1f54c4604c Mon Sep 17 00:00:00 2001 From: Bilal A Date: Fri, 7 Jun 2019 21:25:59 +0000 Subject: Pull correct docker images. Enables Policy CSITs for API, PAP, Distribution and XACML-PDP to pull correct docker images based on the code branch. Issue-ID: POLICY-1834 Signed-off-by: Bilal A Change-Id: I6b99c8ae9cb78dd8ebddc522bc2a7080ec6e5735 --- plans/policy/api/setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plans/policy/api') diff --git a/plans/policy/api/setup.sh b/plans/policy/api/setup.sh index 6168085e..6f6cc294 100644 --- a/plans/policy/api/setup.sh +++ b/plans/policy/api/setup.sh @@ -17,11 +17,19 @@ # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= +# Select branch +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 pip install -U docker==2.7.0 + +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()' -)" +echo $POLICY_API_VERSION # Adding this waiting container to avoid race condition between api and mariadb containers. docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-api.yml run --rm start_dependencies -- cgit 1.2.3-korg