You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2015/06/21 15:14:06 UTC

[10/24] git commit: updated refs/heads/master to 6fd49e4

Add some retry and debug to python packages install Sometimes after a full successful run, travis will fail due to not being able to parse tests output

Signed-off-by: Daan Hoogland <da...@onecht.net>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/118f6079
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/118f6079
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/118f6079

Branch: refs/heads/master
Commit: 118f60794278524abc61b6a63279fb24cee6755c
Parents: 9a50e0f
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Fri Jun 19 00:33:00 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:25 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh | 18 ++++++++++++++----
 tools/travis/downloadDeps.sh   |  4 +++-
 2 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/118f6079/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 4b789e1..9ced6d0 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -66,9 +66,12 @@ sudo mkdir -p /opt/tomcat
 sudo tar xfv tomcat.tar.gz -C /opt/tomcat --strip 1 > /dev/null
 
 echo -e "\nInstalling Development tools: "
+RETRY_COUNT=3
 
 sudo apt-get -q -y install uuid-runtime genisoimage python-setuptools python-pip netcat > /dev/null
-
+if [[ $? -ne 0 ]]; then
+  echo "\napt-get packages failed to install"
+fi
 echo "<settings>
   <mirrors>
     <mirror>
@@ -82,11 +85,18 @@ echo "<settings>
 
 echo -e "\nInstalling some python packages: "
 
-sudo pip install lxml > /dev/null
-sudo pip install texttable > /dev/null
+for ((i=0;i<$RETRY_COUNT;i++))
+do
+  sudo pip install lxml texttable > /tmp/piplog
+  if [[ $? -eq 0 ]]; then
+    echo "\npython packages installed successfully"
+    break;
+  fi
+  echo -e "\npython packages failed to install"
+  cat /tmp/piplog
+done
 
 #Download project dependencies in a way we can retry if there's a failure, without failing the whole build
-RETRY_COUNT=3
 
 #Resolve plugins first
 echo -e "\nDownloading Plugin dependencies"

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/118f6079/tools/travis/downloadDeps.sh
----------------------------------------------------------------------
diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh
index 0edd27a..a124fe8 100755
--- a/tools/travis/downloadDeps.sh
+++ b/tools/travis/downloadDeps.sh
@@ -15,7 +15,7 @@ for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/
   elif [ $1 == "/dependency" ]; then
     #Check if version is empty to fix maven 3.2.5 run
     if [[ $ARTIFACT != *version* ]]; then
-      ARTIFACT="$ARTIFACT<version>LATEST</version>"
+      continue;
     fi
     #Filter out project modules interdependencies and noredist artifacts
     if [[ $ARTIFACT != *org.apache.cloudstack* ]] && [[ $ARTIFACT != *com.cloud* ]] && [[ $ARTIFACT != *org.midonet* ]] && [[ $ARTIFACT != *net.juniper* ]] ; then
@@ -42,6 +42,8 @@ for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/
 
 done
 
+#For some reason, travis seems to be using surefire plugin 2.14.2
+echo "<dependency><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>2.12.4</version></dependency>"  >> pom.xml
 
 #Finish dummy pom
 echo "</dependencies></project>" >> pom.xml