diff options
Diffstat (limited to 'plans/policy')
-rw-r--r-- | plans/policy/apex-pdp/setup.sh | 36 | ||||
-rw-r--r-- | plans/policy/api/setup.sh | 4 | ||||
-rw-r--r-- | plans/policy/distribution/setup.sh | 40 | ||||
-rwxr-xr-x | plans/policy/drools-applications/setup.sh | 6 | ||||
-rw-r--r-- | plans/policy/pap/setup.sh | 6 | ||||
-rw-r--r-- | plans/policy/xacml-pdp/setup.sh | 39 |
6 files changed, 41 insertions, 90 deletions
diff --git a/plans/policy/apex-pdp/setup.sh b/plans/policy/apex-pdp/setup.sh index 16621241..377ce4b1 100644 --- a/plans/policy/apex-pdp/setup.sh +++ b/plans/policy/apex-pdp/setup.sh @@ -3,7 +3,7 @@ # Copyright (C) 2018 Ericsson. All rights reserved. # # Modifications copyright (c) 2019 Nordix Foundation. -# Modifications Copyright (C) 2019 AT&T Intellectual Property. +# Modifications Copyright (C) 2020 AT&T Intellectual Property. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,33 +46,15 @@ if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then exit 1 fi -# bring down maven -mkdir maven -cd maven -# download maven from automatically selected mirror server -curl -vLO "https://www.apache.org/dyn/mirrors/mirrors.cgi?cca2=us&preferred=http://apache.claz.org/&action=download&filename=maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz" -if ! tar -xzvf apache-maven-3.3.9-bin.tar.gz ; then - echo "Installation of maven has failed!" - exit 1 -fi -ls -l -export PATH=${PATH}:${WORK_DIR}/maven/apache-maven-3.3.9/bin -${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 ${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 -cd ${WORKSPACE} -rm -rf ${WORK_DIR} -sleep 3 - sudo apt-get -y install libxml2-utils -export POLICY_API_VERSION="$(curl -q --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 -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" -export POLICY_APEX_PDP_VERSION="$(curl -q --silent https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +bash ${SCRIPTS}/policy/policy-models-dmaap-sim.sh + +POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" +POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" +POLICY_APEX_PDP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_APEX_PDP_VERSION="${POLICY_APEX_PDP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" echo ${POLICY_API_VERSION} echo ${POLICY_PAP_VERSION} diff --git a/plans/policy/api/setup.sh b/plans/policy/api/setup.sh index 91e1edee..8bd4b4af 100644 --- a/plans/policy/api/setup.sh +++ b/plans/policy/api/setup.sh @@ -30,8 +30,10 @@ pip install -U docker==2.7.0 sudo apt-get -y install libxml2-utils -export POLICY_API_VERSION="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" 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 diff --git a/plans/policy/distribution/setup.sh b/plans/policy/distribution/setup.sh index 18cb88ed..d1a08632 100644 --- a/plans/policy/distribution/setup.sh +++ b/plans/policy/distribution/setup.sh @@ -3,7 +3,7 @@ # Copyright (C) 2018 Ericsson. All rights reserved. # # Modifications copyright (c) 2019 Nordix Foundation. -# Modifications Copyright (C) 2019 AT&T Intellectual Property. +# Modifications Copyright (C) 2020 AT&T Intellectual Property. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,7 +19,6 @@ # # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= - source ${SCRIPTS}/policy/config/policy-csit.conf export POLICY_MARIADB_VER echo ${GERRIT_BRANCH} @@ -47,34 +46,17 @@ if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then exit 1 fi -# bring down maven -mkdir maven -cd maven -# download maven from automatically selected mirror server -curl -vLO "https://www.apache.org/dyn/mirrors/mirrors.cgi?cca2=us&preferred=http://apache.claz.org/&action=download&filename=maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz" -if ! tar -xzvf apache-maven-3.3.9-bin.tar.gz ; then - echo "Installation of maven has failed!" - exit 1 -fi -ls -l -export PATH=${PATH}:${WORK_DIR}/maven/apache-maven-3.3.9/bin -${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 ${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 -cd ${WORKSPACE} -rm -rf ${WORK_DIR} -sleep 3 - sudo apt-get -y install libxml2-utils -export POLICY_API_VERSION="$(curl -q --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 -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" -export POLICY_APEX_PDP_VERSION="$(curl -q --silent https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" -export POLICY_DISTRIBUTION_VERSION="$(curl -q --silent https://git.onap.org/policy/distribution/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +bash ${SCRIPTS}/policy/policy-models-dmaap-sim.sh + +POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" +POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" +POLICY_APEX_PDP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_APEX_PDP_VERSION="${POLICY_APEX_PDP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" +POLICY_DISTRIBUTION_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/distribution/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_DISTRIBUTION_VERSION="${POLICY_DISTRIBUTION_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" echo ${POLICY_API_VERSION} echo ${POLICY_PAP_VERSION} diff --git a/plans/policy/drools-applications/setup.sh b/plans/policy/drools-applications/setup.sh index e2ca7893..e550cdb0 100755 --- a/plans/policy/drools-applications/setup.sh +++ b/plans/policy/drools-applications/setup.sh @@ -27,8 +27,10 @@ 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} +POLICY_DROOLS_APPS_VERSION_EXTRACT="$(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_DROOLS_APPS_VERSION_EXTRACT} +export POLICY_DROOLS_APPS_VERSION="${POLICY_DROOLS_APPS_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" +echo ${POLICY_DROOLS_APPS_VERSION} docker login -u docker -p docker nexus3.onap.org:10001 diff --git a/plans/policy/pap/setup.sh b/plans/policy/pap/setup.sh index 0f1ab746..8a613bca 100644 --- a/plans/policy/pap/setup.sh +++ b/plans/policy/pap/setup.sh @@ -30,8 +30,10 @@ pip install -U docker==2.7.0 sudo apt-get -y install libxml2-utils -export POLICY_API_VERSION="$(curl -q --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 -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" +POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" echo ${POLICY_API_VERSION} echo ${POLICY_PAP_VERSION} # Adding this waiting container due to race condition between pap and mariadb diff --git a/plans/policy/xacml-pdp/setup.sh b/plans/policy/xacml-pdp/setup.sh index 9a2e92fe..79c43070 100644 --- a/plans/policy/xacml-pdp/setup.sh +++ b/plans/policy/xacml-pdp/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # ============LICENSE_START======================================================= -# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. +# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,39 +44,20 @@ if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then exit 1 fi -# bring down maven -mkdir maven -cd maven -# download maven from automatically selected mirror server -curl -vLO "https://www.apache.org/dyn/mirrors/mirrors.cgi?cca2=us&preferred=http://apache.claz.org/&action=download&filename=maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz" -if ! tar -xzvf apache-maven-3.3.9-bin.tar.gz ; then - echo "Installation of maven has failed!" - exit 1 -fi -ls -l -export PATH=${PATH}:${WORK_DIR}/maven/apache-maven-3.3.9/bin -${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 ${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 -cd ${WORKSPACE} -rm -rf ${WORK_DIR} -sleep 3 - - - sudo apt-get -y install libxml2-utils -export POLICY_API_VERSION="$(curl -q --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 -q --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 -q --silent https://git.onap.org/policy/xacml-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +bash ${SCRIPTS}/policy/policy-models-dmaap-sim.sh + +POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" +POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" +POLICY_XACML_PDP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/xacml-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)" +export POLICY_XACML_PDP_VERSION="${POLICY_XACML_PDP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest" 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 |