diff options
author | Jim Hahn <jrh3@att.com> | 2021-04-08 15:28:15 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-04-08 16:05:49 -0400 |
commit | cfc44f03869b13373946f6f76adc00e5a0539abb (patch) | |
tree | 50960315236dc4aea6eeb9ada3ca3040762dfda2 /csit | |
parent | 516b0a8287a70500e1c68c13afb264d20af5efeb (diff) |
Use github in lieu of gerrit mirror
The gerrit mirror is not always accessible behind corporate firewalls,
thus changed the CSITs to use github instead.
Also modified the script to only clone ci-management to /tmp if it
does not already exist.
Issue-ID: POLICY-3179
Change-Id: I9cac98b04e000d9365e05a1f2ca1c328fef14c6c
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'csit')
-rw-r--r-- | csit/detmVers.sh | 49 | ||||
-rw-r--r-- | csit/get-models-examples.sh | 2 | ||||
-rwxr-xr-x | csit/prepare-csit.sh | 4 | ||||
-rwxr-xr-x | csit/run-project-csit.sh | 2 |
4 files changed, 21 insertions, 36 deletions
diff --git a/csit/detmVers.sh b/csit/detmVers.sh index 1906292c..56e516c7 100644 --- a/csit/detmVers.sh +++ b/csit/detmVers.sh @@ -20,58 +20,43 @@ source ${SCRIPTS}/get-branch-mariadb.sh echo POLICY_MARIADB_VER=${POLICY_MARIADB_VER} -POLICY_MODELS_VERSION=$( - curl -q --silent \ - https://git.onap.org/policy/models/plain/pom.xml?h=${GERRIT_BRANCH} | - xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -) +function getVersion +{ + REPO=$1 + curl -qL --silent \ + https://github.com/onap/policy-$REPO/raw/${GERRIT_BRANCH}/pom.xml | + xmllint --xpath \ + '/*[local-name()="project"]/*[local-name()="version"]/text()' - +} + +POLICY_MODELS_VERSION=$(getVersion models) export POLICY_MODELS_VERSION=${POLICY_MODELS_VERSION:0:3}-SNAPSHOT-latest echo POLICY_MODELS_VERSION=${POLICY_MODELS_VERSION} -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=$(getVersion api) export POLICY_API_VERSION=${POLICY_API_VERSION:0:3}-SNAPSHOT-latest echo POLICY_API_VERSION=${POLICY_API_VERSION} -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_PAP_VERSION=$(getVersion pap) export POLICY_PAP_VERSION=${POLICY_PAP_VERSION:0:3}-SNAPSHOT-latest echo POLICY_PAP_VERSION=${POLICY_PAP_VERSION} -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()' -) +POLICY_XACML_PDP_VERSION=$(getVersion xacml-pdp) export POLICY_XACML_PDP_VERSION=${POLICY_XACML_PDP_VERSION:0:3}-SNAPSHOT-latest echo POLICY_XACML_PDP_VERSION=${POLICY_XACML_PDP_VERSION} -POLICY_DROOLS_VERSION=$( - curl -q --silent \ - https://git.onap.org/policy/drools-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | - xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -) +POLICY_DROOLS_VERSION=$(getVersion drools-pdp) export POLICY_DROOLS_VERSION=${POLICY_DROOLS_VERSION:0:3}-SNAPSHOT-latest echo POLICY_DROOLS_VERSION=${POLICY_DROOLS_VERSION} -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()' -) +POLICY_DROOLS_APPS_VERSION=$(getVersion drools-applications) export POLICY_DROOLS_APPS_VERSION=${POLICY_DROOLS_APPS_VERSION:0:3}-SNAPSHOT-latest echo POLICY_DROOLS_APPS_VERSION=${POLICY_DROOLS_APPS_VERSION} -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()' -) +POLICY_APEX_PDP_VERSION=$(getVersion apex-pdp) export POLICY_APEX_PDP_VERSION=${POLICY_APEX_PDP_VERSION:0:3}-SNAPSHOT-latest echo POLICY_APEX_PDP_VERSION=${POLICY_APEX_PDP_VERSION} -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()' -) +POLICY_DISTRIBUTION_VERSION=$(getVersion distribution) export POLICY_DISTRIBUTION_VERSION=${POLICY_DISTRIBUTION_VERSION:0:3}-SNAPSHOT-latest echo POLICY_DISTRIBUTION_VERSION=${POLICY_DISTRIBUTION_VERSION} diff --git a/csit/get-models-examples.sh b/csit/get-models-examples.sh index 75b65288..e83b0245 100644 --- a/csit/get-models-examples.sh +++ b/csit/get-models-examples.sh @@ -24,4 +24,4 @@ mkdir ${WORKSPACE}/models cd ${WORKSPACE} # download models examples -git clone -b ${GERRIT_BRANCH} --single-branch git://gerrit-mirror-ap.onap.org/mirror/policy/models.git +git clone -b ${GERRIT_BRANCH} --single-branch https://github.com/onap/policy-models.git models diff --git a/csit/prepare-csit.sh b/csit/prepare-csit.sh index 4275841f..b15aa4ee 100755 --- a/csit/prepare-csit.sh +++ b/csit/prepare-csit.sh @@ -33,11 +33,11 @@ if [ -f ${WORKSPACE}/env.properties ]; then fi if [ -f ${ROBOT_VENV}/bin/activate ]; then source ${ROBOT_VENV}/bin/activate -else +elif [ ! -d /tmp/ci-management ]; then rm -rf /tmp/ci-management rm -f ${WORKSPACE}/env.properties cd /tmp - git clone -b master --single-branch git://gerrit-mirror-ap.onap.org/mirror/ci-management.git + git clone -b master --single-branch https://github.com/onap/ci-management.git source /tmp/ci-management/jjb/integration/include-raw-integration-install-robotframework.sh fi diff --git a/csit/run-project-csit.sh b/csit/run-project-csit.sh index c3d67d9e..07b9dea2 100755 --- a/csit/run-project-csit.sh +++ b/csit/run-project-csit.sh @@ -150,7 +150,7 @@ mkdir ${WORKSPACE}/${PROJECT} cd ${WORKSPACE} # get the plan from git clone -if ! `git clone -b ${GERRIT_BRANCH} --single-branch git://gerrit-mirror-ap.onap.org/mirror/policy/${PROJECT}.git` ; then +if ! `git clone -b ${GERRIT_BRANCH} --single-branch https://github.com/onap/policy-${PROJECT}.git ${PROJECT}` ; then echo "repo not found: policy/${PROJECT}" exit 1 fi |