aboutsummaryrefslogtreecommitdiffstats
path: root/plans
diff options
context:
space:
mode:
authorMartin Klozik <martin.klozik@tieto.com>2019-09-04 10:24:25 +0200
committerMartin Klozik <martin.klozik@tieto.com>2019-09-10 11:39:28 +0200
commitf5ae348b6e7d5c5d4612ff6dc7a33bbeddfb4362 (patch)
tree9aa485d1773911830803cfda67d9556139479884 /plans
parent9d5fb225cbc57680ca80b54e5f2501f55b4acb46 (diff)
POLICY: update of apache-maven repo URL
Allow automatic selection of the best apache mirror server to avoid hardcoded mirror server in apache-maven download url. This change should increase reliability of POLICY CSIT test plans in case that some mirror servers are experiencing issues. Originally used server is set as preferred, i.e. it still will be used if it's available. In case of failure of maven installation, test plan execution will be terminated with failure. Change-Id: Ia765652b42e6a20716f5e76304916602852b5654 Issue-ID: POLICY-2046 Signed-off-by: Martin Klozik <martin.klozik@tieto.com>
Diffstat (limited to 'plans')
-rw-r--r--plans/policy/apex-pdp/setup.sh8
-rw-r--r--plans/policy/distribution/setup.sh8
-rw-r--r--plans/policy/xacml-pdp/setup.sh8
3 files changed, 18 insertions, 6 deletions
diff --git a/plans/policy/apex-pdp/setup.sh b/plans/policy/apex-pdp/setup.sh
index 22e813df..16621241 100644
--- a/plans/policy/apex-pdp/setup.sh
+++ b/plans/policy/apex-pdp/setup.sh
@@ -49,8 +49,12 @@ fi
# bring down maven
mkdir maven
cd maven
-curl -O http://apache.claz.org/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
-tar -xzvf apache-maven-3.3.9-bin.tar.gz
+# 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
diff --git a/plans/policy/distribution/setup.sh b/plans/policy/distribution/setup.sh
index 399df0e6..18cb88ed 100644
--- a/plans/policy/distribution/setup.sh
+++ b/plans/policy/distribution/setup.sh
@@ -50,8 +50,12 @@ fi
# bring down maven
mkdir maven
cd maven
-curl -O http://apache.claz.org/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
-tar -xzvf apache-maven-3.3.9-bin.tar.gz
+# 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
diff --git a/plans/policy/xacml-pdp/setup.sh b/plans/policy/xacml-pdp/setup.sh
index 1d4325bd..9a2e92fe 100644
--- a/plans/policy/xacml-pdp/setup.sh
+++ b/plans/policy/xacml-pdp/setup.sh
@@ -47,8 +47,12 @@ fi
# bring down maven
mkdir maven
cd maven
-curl -O http://apache.claz.org/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
-tar -xzvf apache-maven-3.3.9-bin.tar.gz
+# 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