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:13:57 UTC

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

Repository: cloudstack
Updated Branches:
  refs/heads/master bbb165a03 -> 6fd49e49a


Get some verbosity and debug on after_script.sh to troubleshoot timeouts on this phase Travis is using maven 3.2.5 and this script was setting an alternate maven path before running script Setting CATALINA_BASE and CATALINA_HOME is of no consequence while running jetty, just adds more problems

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/6a6d64b9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6a6d64b9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6a6d64b9

Branch: refs/heads/master
Commit: 6a6d64b99a79963a7cc82063556177d4b508eae2
Parents: b55ef55
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Thu Jun 18 23:23:00 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:24 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_script.sh | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a6d64b9/tools/travis/before_script.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_script.sh b/tools/travis/before_script.sh
index cba50e0..1c39bf2 100755
--- a/tools/travis/before_script.sh
+++ b/tools/travis/before_script.sh
@@ -35,12 +35,13 @@ if [ $MOD -ne 0 ]; then
 fi
 
 
-export CATALINA_BASE=/opt/tomcat
-export CATALINA_HOME=/opt/tomcat
-export M2_HOME="/usr/local/maven-3.2.1/"
+#export CATALINA_BASE=/opt/tomcat
+#export CATALINA_HOME=/opt/tomcat
+#export M2_HOME="/usr/local/maven-3.2.1/"
 export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m"
+echo -e "\nStarting simulator"
+mvn -Dsimulator -pl :cloud-client-ui jetty:run 2>&1 > /tmp/jetty-log &
 
-mvn -Dsimulator -pl :cloud-client-ui jetty:run 2>&1 > /dev/null &
-
-while ! nc -vz localhost 8096 2>&1 > /dev/null; do sleep 10; done
+while ! nc -vz localhost 8096 2>&1 > /dev/null; do grep Exception /tmp/jetty-log; sleep 10; done
+echo -e "\nStarting simulator"
 python -m marvin.deployDataCenter -i setup/dev/advanced.cfg 2>&1 || true


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

Posted by da...@apache.org.
Tomcat download is not doing anything except waste time and disk

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/c4a38bdb
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c4a38bdb
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c4a38bdb

Branch: refs/heads/master
Commit: c4a38bdb0d4c2fd77ef8ab5622835fde5b0242b8
Parents: 4047dd5
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Fri Jun 19 02:57:01 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:25 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh | 5 -----
 tools/travis/before_script.sh  | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c4a38bdb/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 9ced6d0..7b8fb7c 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -60,11 +60,6 @@ sudo apt-get -q -y install mysql-server > /dev/null
 
 sudo /etc/init.d/mysql start
 
-echo -e "\nInstalling Tomcat: "
-wget -q -O tomcat.tar.gz http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin/apache-tomcat-6.0.33.tar.gz
-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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c4a38bdb/tools/travis/before_script.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_script.sh b/tools/travis/before_script.sh
index ead2851..7f58461 100755
--- a/tools/travis/before_script.sh
+++ b/tools/travis/before_script.sh
@@ -43,5 +43,5 @@ echo -e "\nStarting simulator"
 mvn -Dsimulator -pl :cloud-client-ui jetty:run 2>&1 > /tmp/jetty-log &
 
 while ! nc -vzw 5 localhost 8096 2>&1 > /dev/null; do grep Exception /tmp/jetty-log; sleep 10; done
-echo -e "\nStarting simulator"
+echo -e "\nStarting DataCenter deployment"
 python -m marvin.deployDataCenter -i setup/dev/advanced.cfg 2>&1 || true


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

Posted by da...@apache.org.
Print log data on after_failure.sh

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/773e4158
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/773e4158
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/773e4158

Branch: refs/heads/master
Commit: 773e4158b6387d837ba4905d654d607f772a4951
Parents: 348bd2f
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Fri Jun 19 16:33:35 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:26 2015 +0200

----------------------------------------------------------------------
 tools/travis/after_failure.sh  | 2 +-
 tools/travis/before_install.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/773e4158/tools/travis/after_failure.sh
----------------------------------------------------------------------
diff --git a/tools/travis/after_failure.sh b/tools/travis/after_failure.sh
index 1bc22aa..df40f73 100755
--- a/tools/travis/after_failure.sh
+++ b/tools/travis/after_failure.sh
@@ -19,4 +19,4 @@
 # As the filename suggests, this is executed on build failure
 # failure.
 #
-
+find /tmp//MarvinLogs -type f -exec echo -e "Printing logfile {} :\n" \; -exec cat {} \;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/773e4158/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 334f6fe..78faa3c 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -84,7 +84,7 @@ for ((i=0;i<$RETRY_COUNT;i++))
 do
   sudo pip install lxml texttable > /tmp/piplog
   if [[ $? -eq 0 ]]; then
-    echo "\npython packages installed successfully"
+    echo -e "\npython packages installed successfully"
     break;
   fi
   echo -e "\npython packages failed to install"


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

Posted by da...@apache.org.
Second phase wan't running properly due to path issue Add extra echo command to make sure there's data in the pom

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/f0dcd403
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f0dcd403
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f0dcd403

Branch: refs/heads/master
Commit: f0dcd403e7334a9bc8c18b8090fc4bf9db595ee9
Parents: f0e1c89
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Thu Jun 18 22:41:20 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:24 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh | 1 +
 tools/travis/downloadDeps.sh   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0dcd403/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 770be61..b4a4bc4 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -102,6 +102,7 @@ done
 cd tools/travis
 ./downloadDeps.sh 2> /dev/null
 echo -e "\nDownloading Project dependencies"
+echo -e "$(cat pom.xml |wc -l) lines in dummy pom.xml"
 
 for ((i=0;i<$RETRY_COUNT;i++))
 do

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0dcd403/tools/travis/downloadDeps.sh
----------------------------------------------------------------------
diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh
index 29248e0..acf13dc 100755
--- a/tools/travis/downloadDeps.sh
+++ b/tools/travis/downloadDeps.sh
@@ -2,7 +2,7 @@
 echo '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><dependencies>' > pom.xml
 
 #Get all dependency blocks
-for line in $(find . -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/dependencies>/b;p;ba}' {} \; | grep -e "artifactId" -e "groupId" -e "version" -e "dependency\>" -e "exclusion\>" -e "exclusions\>"); do
+for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/dependencies>/b;p;ba}' {} \; | grep -e "artifactId" -e "groupId" -e "version" -e "dependency\>" -e "exclusion\>" -e "exclusions\>"); do
 
   #Tokenize values
   set -- $(echo $line | awk -v FS="(>|<)" '{print $2, $3}')


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

Posted by da...@apache.org.
Use upstart to start mysql and get rid of the warnings

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/348bd2f3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/348bd2f3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/348bd2f3

Branch: refs/heads/master
Commit: 348bd2f3cc592eecb842a696ed4234c8eb812e09
Parents: e52f3ab
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Fri Jun 19 13:56:05 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:26 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/348bd2f3/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 8ad9fd9..334f6fe 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -58,7 +58,7 @@ sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password passwor
 sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password your_password'
 sudo apt-get -q -y install mysql-server > /dev/null
 
-sudo /etc/init.d/mysql start
+sudo start mysql
 
 echo -e "\nInstalling Development tools: "
 RETRY_COUNT=3


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

Posted by da...@apache.org.
Can't run travis_wait from script, this just throws an error

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/4047dd57
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4047dd57
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4047dd57

Branch: refs/heads/master
Commit: 4047dd571dcae1720327854c12151b47d8cb0828
Parents: 118f607
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Fri Jun 19 02:55:43 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:25 2015 +0200

----------------------------------------------------------------------
 tools/travis/script.sh | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4047dd57/tools/travis/script.sh
----------------------------------------------------------------------
diff --git a/tools/travis/script.sh b/tools/travis/script.sh
index e1c75bb..7e7c497 100755
--- a/tools/travis/script.sh
+++ b/tools/travis/script.sh
@@ -39,7 +39,6 @@ mkdir -p integration-test-results/component
 
 
 for suite in $1; do
-  travis_wait 30
   nosetests --with-xunit --xunit-file=integration-test-results/$suite.xml --with-marvin --marvin-config=setup/dev/advanced.cfg test/integration/$suite.py -s -a tags=advanced,required_hardware=false --zone=Sandbox-simulator --hypervisor=simulator || true ;
 done
 


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

Posted by da...@apache.org.
Send output to oblivion because of this message in travis log view: This log is too long to be displayed. Please reduce the verbosity of your build or download the raw log.

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/f0e1c890
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f0e1c890
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f0e1c890

Branch: refs/heads/master
Commit: f0e1c8908bbdcd22490582aeade197df65c49334
Parents: 880f116
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Thu Jun 18 22:26:19 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:24 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0e1c890/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index dd90ec6..770be61 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -89,9 +89,10 @@ sudo pip install texttable > /dev/null
 RETRY_COUNT=3
 
 #Resolve plugins first
+echo -e "\nDownloading Plugin dependencies"
 for ((i=0;i<$RETRY_COUNT;i++))
 do
- mvn org.apache.maven.plugins:maven-dependency-plugin:resolve-plugins
+ mvn org.apache.maven.plugins:maven-dependency-plugin:resolve-plugins > /dev/null
  if [[ $? -eq 0 ]]; then
    break;
  fi
@@ -100,10 +101,11 @@ done
 #Resolve remaining deps
 cd tools/travis
 ./downloadDeps.sh 2> /dev/null
+echo -e "\nDownloading Project dependencies"
 
 for ((i=0;i<$RETRY_COUNT;i++))
 do
- mvn org.apache.maven.plugins:maven-dependency-plugin:resolve
+ mvn org.apache.maven.plugins:maven-dependency-plugin:resolve > /dev/null
  if [[ $? -eq 0 ]]; then
    break;
  fi


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

Posted by da...@apache.org.
Some of the plugin dependencies were'nt being properly resolved on the dependency:resolve-plugins mojo This adds a couple more dark magic sprinkles to make sure no dependencies will be downloaded at build time

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/0d671b9e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0d671b9e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0d671b9e

Branch: refs/heads/master
Commit: 0d671b9e54e19a4ed10215983857848052bc7cc6
Parents: 358157f
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Sat Jun 20 18:19:48 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:27 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh |  2 +-
 tools/travis/downloadDeps.sh   | 12 +++++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d671b9e/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index e9bcb33..5f04c79 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -97,7 +97,7 @@ done
 echo -e "\nDownloading Plugin dependencies"
 for ((i=0;i<$RETRY_COUNT;i++))
 do
- mvn org.apache.maven.plugins:maven-dependency-plugin:resolve-plugins > /dev/null
+ mvn org.apache.maven.plugins:maven-dependency-plugin:resolve-plugins | grep "Plugin Resolved:" | sort -u | awk '{print $4}' | tee /tmp/resolvedPlugins
  if [[ $? -eq 0 ]]; then
    echo -e "\nPlugin dependencies downloaded successfully"
    break;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d671b9e/tools/travis/downloadDeps.sh
----------------------------------------------------------------------
diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh
index ae53028..c7d60a2 100755
--- a/tools/travis/downloadDeps.sh
+++ b/tools/travis/downloadDeps.sh
@@ -42,9 +42,15 @@ 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
-echo "<dependency><groupId>com.google.guava</groupId><artifactId>guava</artifactId><version>10.0.1</version></dependency>"  >> pom.xml
+#Add the resolved plugins to properly download their dependencies
+while read line ; do
+    NAME=$(echo $line | sed -e 's/.jar$//')
+    VERSION=${NAME##*-}
+    ARTIFACT=${NAME%-*}
+    GROUP=$(find ~/.m2/repository -name ${NAME}.pom -exec sed -n "1,/${ARTIFACT}/p" {} \; | tac | grep -m 1 -e "<groupId>"  | sed -e 's/^[[:space:]]*//' | tr -d '\r')
+    DATA="<dependency>${GROUP}<artifactId>${ARTIFACT}</artifactId><version>${VERSION}</version></dependency>"
+    echo $DATA >> pom.xml
+done < /tmp/resolvedPlugins
 
 #Finish dummy pom
 echo "</dependencies></project>" >> pom.xml


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

Posted by da...@apache.org.
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


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

Posted by da...@apache.org.
Fix phase2 deps download for maven 3.2.5 This version didn't like missing <version> tag on artifacts

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/9a50e0f0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9a50e0f0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9a50e0f0

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

----------------------------------------------------------------------
 tools/travis/downloadDeps.sh | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a50e0f0/tools/travis/downloadDeps.sh
----------------------------------------------------------------------
diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh
index acf13dc..0edd27a 100755
--- a/tools/travis/downloadDeps.sh
+++ b/tools/travis/downloadDeps.sh
@@ -13,6 +13,10 @@ for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/
     #Create new artifact dep
     ARTIFACT=$line
   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>"
+    fi
     #Filter out project modules interdependencies and noredist artifacts
     if [[ $ARTIFACT != *org.apache.cloudstack* ]] && [[ $ARTIFACT != *com.cloud* ]] && [[ $ARTIFACT != *org.midonet* ]] && [[ $ARTIFACT != *net.juniper* ]] ; then
 	echo $ARTIFACT$line >> pom.xml


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

Posted by da...@apache.org.
Travis reported another false negative, if paramiko was present but version too low for marvin, nosetests wouldn't run and result would be success

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/5386e0f6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5386e0f6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5386e0f6

Branch: refs/heads/master
Commit: 5386e0f6b57939f5cfc629934a78559f37d12da2
Parents: f7a8d8e
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Sat Jun 20 00:47:50 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:26 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5386e0f6/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 78faa3c..95c0d3e 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -83,6 +83,7 @@ echo -e "\nInstalling some python packages: "
 for ((i=0;i<$RETRY_COUNT;i++))
 do
   sudo pip install lxml texttable > /tmp/piplog
+  sudo pip install --upgrade paramiko >> /tmp/piplog
   if [[ $? -eq 0 ]]; then
     echo -e "\npython packages installed successfully"
     break;


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

Posted by da...@apache.org.
Allow proper retry in pip install command

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/e4f09e9e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e4f09e9e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e4f09e9e

Branch: refs/heads/master
Commit: e4f09e9ebcaaa5984a9679d8f8f98ca383f6224e
Parents: 5386e0f
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Sat Jun 20 02:06:13 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:27 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e4f09e9e/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 95c0d3e..e9bcb33 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -82,8 +82,7 @@ echo -e "\nInstalling some python packages: "
 
 for ((i=0;i<$RETRY_COUNT;i++))
 do
-  sudo pip install lxml texttable > /tmp/piplog
-  sudo pip install --upgrade paramiko >> /tmp/piplog
+  sudo pip install --upgrade lxml texttable paramiko > /tmp/piplog
   if [[ $? -eq 0 ]]; then
     echo -e "\npython packages installed successfully"
     break;


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

Posted by da...@apache.org.
Remove some more unwanted stuff in install.sh

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/b95f47c4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b95f47c4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b95f47c4

Branch: refs/heads/master
Commit: b95f47c4d420d471e6f4ea4637647e984e029e28
Parents: c4a38bd
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Fri Jun 19 12:34:39 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:25 2015 +0200

----------------------------------------------------------------------
 tools/travis/install.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b95f47c4/tools/travis/install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/install.sh b/tools/travis/install.sh
index 3654e42..27e7ef2 100755
--- a/tools/travis/install.sh
+++ b/tools/travis/install.sh
@@ -34,9 +34,9 @@ if [ $MOD -ne 0 ]; then
  fi
 fi
 
-export CATALINA_BASE=/opt/tomcat
-export CATALINA_HOME=/opt/tomcat
-export M2_HOME="/usr/local/maven-3.2.1/"
+#export CATALINA_BASE=/opt/tomcat
+#export CATALINA_HOME=/opt/tomcat
+#export M2_HOME="/usr/local/maven-3.2.1/"
 export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m"
 
 if [ $TEST_SEQUENCE_NUMBER -eq 1 ]; then


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

Posted by da...@apache.org.
Manually add another dependency to be downloaded before build

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/358157f5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/358157f5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/358157f5

Branch: refs/heads/master
Commit: 358157f57c872b5e987cc311ae1e046966059457
Parents: e4f09e9
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Sat Jun 20 02:58:53 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:27 2015 +0200

----------------------------------------------------------------------
 tools/travis/downloadDeps.sh | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/358157f5/tools/travis/downloadDeps.sh
----------------------------------------------------------------------
diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh
index a124fe8..ae53028 100755
--- a/tools/travis/downloadDeps.sh
+++ b/tools/travis/downloadDeps.sh
@@ -44,6 +44,7 @@ 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
+echo "<dependency><groupId>com.google.guava</groupId><artifactId>guava</artifactId><version>10.0.1</version></dependency>"  >> pom.xml
 
 #Finish dummy pom
 echo "</dependencies></project>" >> pom.xml


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

Posted by da...@apache.org.
Add urandom as random source in install.sh

Add urandom as random source in before_script.sh

Remove commented lines in before_script.sh

Remove commented lines in install.sh

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/e52f3ab9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e52f3ab9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e52f3ab9

Branch: refs/heads/master
Commit: e52f3ab9322bae0823092874a54ca13df620dc92
Parents: b95f47c
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Fri Jun 19 12:38:27 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:26 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh | 2 +-
 tools/travis/before_script.sh  | 5 +----
 tools/travis/install.sh        | 5 +----
 3 files changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e52f3ab9/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 7b8fb7c..8ad9fd9 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -65,7 +65,7 @@ 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"
+  echo -e "\napt-get packages failed to install"
 fi
 echo "<settings>
   <mirrors>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e52f3ab9/tools/travis/before_script.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_script.sh b/tools/travis/before_script.sh
index 7f58461..40e6700 100755
--- a/tools/travis/before_script.sh
+++ b/tools/travis/before_script.sh
@@ -35,10 +35,7 @@ if [ $MOD -ne 0 ]; then
 fi
 
 
-#export CATALINA_BASE=/opt/tomcat
-#export CATALINA_HOME=/opt/tomcat
-#export M2_HOME="/usr/local/maven-3.2.1/"
-export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m"
+export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m -Djava.security.egd=file:/dev/./urandom"
 echo -e "\nStarting simulator"
 mvn -Dsimulator -pl :cloud-client-ui jetty:run 2>&1 > /tmp/jetty-log &
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e52f3ab9/tools/travis/install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/install.sh b/tools/travis/install.sh
index 27e7ef2..28f4ed4 100755
--- a/tools/travis/install.sh
+++ b/tools/travis/install.sh
@@ -34,10 +34,7 @@ if [ $MOD -ne 0 ]; then
  fi
 fi
 
-#export CATALINA_BASE=/opt/tomcat
-#export CATALINA_HOME=/opt/tomcat
-#export M2_HOME="/usr/local/maven-3.2.1/"
-export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m"
+export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m -Djava.security.egd=file:/dev/./urandom"
 
 if [ $TEST_SEQUENCE_NUMBER -eq 1 ]; then
    mvn -q -Pimpatient -Dsimulator clean install


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

Posted by da...@apache.org.
Don't sleep for a fixed amount of time, no use in continuing if repo is unavailable Check if DNS resolution is working properly when failure occurs

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/c1c0382b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c1c0382b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c1c0382b

Branch: refs/heads/master
Commit: c1c0382bf5be474823c5b3b0fda800b0716f05dd
Parents: 6a6d64b
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Thu Jun 18 23:45:26 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:25 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1c0382b/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index eee53f8..6970d90 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -97,8 +97,10 @@ do
    echo -e "\nPlugin dependencies downloaded successfully"
    break;
  fi
- echo -e "\nRetrying in 10 seconds..."
- sleep 10
+ echo -e "\nDependency download failed"
+ #Test DNS record
+ host repo1.maven.org
+ while ! nc -vzw 5 repo1.maven.org 80; do echo -e "\nFailed to connect to repo1.maven.org:80 will retry in 10 seconds"; sleep 10; done
 done
 
 #Resolve remaining deps
@@ -114,7 +116,9 @@ do
    echo -e "\nProject dependencies downloaded successfully"
    break;
  fi
- echo -e "\nRetrying in 10 seconds..."
- sleep 10
+ echo -e "\nDependency download failed"
+ #Test DNS record
+ host repo1.maven.org
+ while ! nc -vzw 5 repo1.maven.org 80; do echo -e "\nFailed to connect to repo1.maven.org:80 will retry in 10 seconds"; sleep 10; done
 done
 cd ../..


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

Posted by da...@apache.org.
Add timeout to nc command, as it was waiting forever and not going through the while loop. This will make sure nc gets restared to retry in case something nasty is happening in the running process

host command not present in build env, switch to getent
second phase of dep download turning some error, print failure log

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/7838bfcc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7838bfcc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7838bfcc

Branch: refs/heads/master
Commit: 7838bfcc70efc111e9f838353081af6fe0aec51a
Parents: c1c0382
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Thu Jun 18 23:54:53 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:25 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh | 7 ++++---
 tools/travis/before_script.sh  | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7838bfcc/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 6970d90..4b789e1 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -99,7 +99,7 @@ do
  fi
  echo -e "\nDependency download failed"
  #Test DNS record
- host repo1.maven.org
+ getent hosts repo1.maven.org
  while ! nc -vzw 5 repo1.maven.org 80; do echo -e "\nFailed to connect to repo1.maven.org:80 will retry in 10 seconds"; sleep 10; done
 done
 
@@ -111,14 +111,15 @@ echo -e "$(cat pom.xml |wc -l) lines in dummy pom.xml"
 
 for ((i=0;i<$RETRY_COUNT;i++))
 do
- mvn org.apache.maven.plugins:maven-dependency-plugin:resolve > /dev/null
+ mvn org.apache.maven.plugins:maven-dependency-plugin:resolve > /tmp/phase2
  if [[ $? -eq 0 ]]; then
    echo -e "\nProject dependencies downloaded successfully"
    break;
  fi
  echo -e "\nDependency download failed"
+ cat /tmp/phase2
  #Test DNS record
- host repo1.maven.org
+ getent hosts repo1.maven.org
  while ! nc -vzw 5 repo1.maven.org 80; do echo -e "\nFailed to connect to repo1.maven.org:80 will retry in 10 seconds"; sleep 10; done
 done
 cd ../..

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7838bfcc/tools/travis/before_script.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_script.sh b/tools/travis/before_script.sh
index 1c39bf2..ead2851 100755
--- a/tools/travis/before_script.sh
+++ b/tools/travis/before_script.sh
@@ -42,6 +42,6 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m"
 echo -e "\nStarting simulator"
 mvn -Dsimulator -pl :cloud-client-ui jetty:run 2>&1 > /tmp/jetty-log &
 
-while ! nc -vz localhost 8096 2>&1 > /dev/null; do grep Exception /tmp/jetty-log; sleep 10; done
+while ! nc -vzw 5 localhost 8096 2>&1 > /dev/null; do grep Exception /tmp/jetty-log; sleep 10; done
 echo -e "\nStarting simulator"
 python -m marvin.deployDataCenter -i setup/dev/advanced.cfg 2>&1 || true


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

Posted by da...@apache.org.
Fix erroneous assert expression to get debug from that line

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/f7a8d8e6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f7a8d8e6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f7a8d8e6

Branch: refs/heads/master
Commit: f7a8d8e657ddcf23112fd8d9f1974108efb1e7c3
Parents: f77f4c2
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Sat Jun 20 00:05:09 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:26 2015 +0200

----------------------------------------------------------------------
 .../smoke/test_deploy_vms_with_varied_deploymentplanners.py        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f7a8d8e6/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
index 9fcb643..041d23b 100644
--- a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
+++ b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
@@ -43,7 +43,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
         )
 
         if cls.template == FAILED:
-            assert false, "get_template() failed to return template with description %s" % cls.services["ostype"]
+            assert False, "get_template() failed to return template with description %s" % cls.services["ostype"]
 
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.services["template"] = cls.template.id


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

Posted by da...@apache.org.
xunit-reader.py was returning success in case of exception being thrown during test!

Revert the fix to throw failed test on exception, will fix that in a separate branch so all the other fixes can be committed already and not raise failure on an old intermittent issue that was hidden

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/f77f4c2f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f77f4c2f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f77f4c2f

Branch: refs/heads/master
Commit: f77f4c2f11e52a1195b85e2edfa2f11dcbb5db4a
Parents: 773e415
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Fri Jun 19 21:26:03 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:26 2015 +0200

----------------------------------------------------------------------
 tools/travis/xunit-reader.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f77f4c2f/tools/travis/xunit-reader.py
----------------------------------------------------------------------
diff --git a/tools/travis/xunit-reader.py b/tools/travis/xunit-reader.py
index ffabbd4..c492c01 100755
--- a/tools/travis/xunit-reader.py
+++ b/tools/travis/xunit-reader.py
@@ -97,4 +97,4 @@ def parse_reports(file_path_list):
 
 
 if __name__ == "__main__":
-    main()
\ No newline at end of file
+    main()


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

Posted by da...@apache.org.
This is a quick fix to attempt to resolve most of the travis failures Most of the failures have been due to transient network failures, that are causing dependency artifact downloads to fail Maven does not have a way to retry this without restarting the whole build, so the mvn dependency plugin is the best bet Unfortunately, running a dependency:resolve on the project returns yet to be compiled dependencies, and causes it to fail... There is an option to excludeGroupIds and excludeArtifactIds in the docs for this goal, but unfortunately they don't seem to work This drafts a dummy pom in a quick and dirty way, just to download all the deps in one go, while retrying for RETRY_COUNT times if it fails

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/880f116a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/880f116a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/880f116a

Branch: refs/heads/master
Commit: 880f116a629c7f00af3ad4af331924edeb585047
Parents: bbb165a
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Thu Jun 18 22:04:51 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:24 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh | 25 +++++++++++++++++++++
 tools/travis/downloadDeps.sh   | 43 +++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/880f116a/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 31efc65..dd90ec6 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -84,3 +84,28 @@ echo -e "\nInstalling some python packages: "
 
 sudo pip install lxml > /dev/null
 sudo pip install texttable > /dev/null
+
+#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
+for ((i=0;i<$RETRY_COUNT;i++))
+do
+ mvn org.apache.maven.plugins:maven-dependency-plugin:resolve-plugins
+ if [[ $? -eq 0 ]]; then
+   break;
+ fi
+done
+
+#Resolve remaining deps
+cd tools/travis
+./downloadDeps.sh 2> /dev/null
+
+for ((i=0;i<$RETRY_COUNT;i++))
+do
+ mvn org.apache.maven.plugins:maven-dependency-plugin:resolve
+ if [[ $? -eq 0 ]]; then
+   break;
+ fi
+done
+cd ../..

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/880f116a/tools/travis/downloadDeps.sh
----------------------------------------------------------------------
diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh
new file mode 100755
index 0000000..29248e0
--- /dev/null
+++ b/tools/travis/downloadDeps.sh
@@ -0,0 +1,43 @@
+#Create dummy pom
+echo '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><dependencies>' > pom.xml
+
+#Get all dependency blocks
+for line in $(find . -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/dependencies>/b;p;ba}' {} \; | grep -e "artifactId" -e "groupId" -e "version" -e "dependency\>" -e "exclusion\>" -e "exclusions\>"); do
+
+  #Tokenize values
+  set -- $(echo $line | awk -v FS="(>|<)" '{print $2, $3}')
+
+  #Start processing data
+
+  if [ $1 == "dependency" ]; then
+    #Create new artifact dep
+    ARTIFACT=$line
+  elif [ $1 == "/dependency" ]; then
+    #Filter out project modules interdependencies and noredist artifacts
+    if [[ $ARTIFACT != *org.apache.cloudstack* ]] && [[ $ARTIFACT != *com.cloud* ]] && [[ $ARTIFACT != *org.midonet* ]] && [[ $ARTIFACT != *net.juniper* ]] ; then
+	echo $ARTIFACT$line >> pom.xml
+    fi
+  elif [ $1 == "version" ]; then
+    #If version is a maven var, get the value from parent pom
+    if [[ $2 == \$\{* ]]; then
+
+      VER=$(grep \<$(echo $2 | awk -v FS="(}|{)" '{print $2 }') ../../pom.xml | awk -v FS="(>|<)" '{print $3}')
+      if [[ "$VER" == "" ]]; then
+        ARTIFACT=org.apache.cloudstack
+      else
+        ARTIFACT="$ARTIFACT<version>$VER</version>"
+      fi
+    elif [[ "$2" == "" ]]; then
+      ARTIFACT="$ARTIFACT<version>LATEST</version>"
+    else
+      ARTIFACT=$ARTIFACT$line
+    fi
+  else
+    ARTIFACT=$ARTIFACT$line
+  fi
+
+done
+
+
+#Finish dummy pom
+echo "</dependencies></project>" >> pom.xml


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

Posted by da...@apache.org.
It seems the network failures last for a bit.. allow some sleeping time Add some verbosity for status checking

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/b55ef551
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b55ef551
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b55ef551

Branch: refs/heads/master
Commit: b55ef551ca593d086277c8f849854e1fee7880a5
Parents: f0dcd40
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Thu Jun 18 23:08:54 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:24 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b55ef551/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index b4a4bc4..eee53f8 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -94,8 +94,11 @@ for ((i=0;i<$RETRY_COUNT;i++))
 do
  mvn org.apache.maven.plugins:maven-dependency-plugin:resolve-plugins > /dev/null
  if [[ $? -eq 0 ]]; then
+   echo -e "\nPlugin dependencies downloaded successfully"
    break;
  fi
+ echo -e "\nRetrying in 10 seconds..."
+ sleep 10
 done
 
 #Resolve remaining deps
@@ -108,7 +111,10 @@ for ((i=0;i<$RETRY_COUNT;i++))
 do
  mvn org.apache.maven.plugins:maven-dependency-plugin:resolve > /dev/null
  if [[ $? -eq 0 ]]; then
+   echo -e "\nProject dependencies downloaded successfully"
    break;
  fi
+ echo -e "\nRetrying in 10 seconds..."
+ sleep 10
 done
 cd ../..


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

Posted by da...@apache.org.
Improve plugin dependency download Add download for midonet and juniper stuff, this increases runtime for a few minutes, may remove in future if travis show too much overhead

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/b9f5d387
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b9f5d387
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b9f5d387

Branch: refs/heads/master
Commit: b9f5d387725e48effa3a9b2a02485686d137fc55
Parents: 0d671b9
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Sun Jun 21 03:46:42 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:27 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh |   8 +--
 tools/travis/downloadDeps.sh   | 118 ++++++++++++++++++++++++++----------
 2 files changed, 90 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b9f5d387/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 5f04c79..69646a7 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -110,19 +110,17 @@ done
 
 #Resolve remaining deps
 cd tools/travis
-./downloadDeps.sh 2> /dev/null
 echo -e "\nDownloading Project dependencies"
-echo -e "$(cat pom.xml |wc -l) lines in dummy pom.xml"
 
 for ((i=0;i<$RETRY_COUNT;i++))
 do
- mvn org.apache.maven.plugins:maven-dependency-plugin:resolve > /tmp/phase2
+ ./downloadDeps.sh > /tmp/phase2
  if [[ $? -eq 0 ]]; then
-   echo -e "\nProject dependencies downloaded successfully"
+   echo -e "\n$(cat cleandeps.out |wc -l) project dependencies downloaded successfully"
    break;
  fi
  echo -e "\nDependency download failed"
- cat /tmp/phase2
+ cat /tmp/phase2 | grep -i -e "fail" -e "error" -e "exception"
  #Test DNS record
  getent hosts repo1.maven.org
  while ! nc -vzw 5 repo1.maven.org 80; do echo -e "\nFailed to connect to repo1.maven.org:80 will retry in 10 seconds"; sleep 10; done

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b9f5d387/tools/travis/downloadDeps.sh
----------------------------------------------------------------------
diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh
index c7d60a2..6045feb 100755
--- a/tools/travis/downloadDeps.sh
+++ b/tools/travis/downloadDeps.sh
@@ -1,43 +1,43 @@
-#Create dummy pom
-echo '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><dependencies>' > pom.xml
-
-#Get all dependency blocks
-for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/dependencies>/b;p;ba}' {} \; | grep -e "artifactId" -e "groupId" -e "version" -e "dependency\>" -e "exclusion\>" -e "exclusions\>"); do
+for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/dependencies>/b;p;ba}' {} \; | grep -e "artifactId" -e "groupId" -e "version" -e "dependency\>" -e "exclusion\>" -e "exclusions\>"| sed -e 's/\^M//'); do
 
   #Tokenize values
   set -- $(echo $line | awk -v FS="(>|<)" '{print $2, $3}')
 
   #Start processing data
 
-  if [ $1 == "dependency" ]; then
+  if [[ $1 == "dependency" ]]; then
     #Create new artifact dep
-    ARTIFACT=$line
-  elif [ $1 == "/dependency" ]; then
-    #Check if version is empty to fix maven 3.2.5 run
-    if [[ $ARTIFACT != *version* ]]; then
-      continue;
-    fi
+    unset ARTIFACT
+    unset VERSION
+    unset GROUP
+  elif [[ $1 == "/dependency" ]]; then
     #Filter out project modules interdependencies and noredist artifacts
-    if [[ $ARTIFACT != *org.apache.cloudstack* ]] && [[ $ARTIFACT != *com.cloud* ]] && [[ $ARTIFACT != *org.midonet* ]] && [[ $ARTIFACT != *net.juniper* ]] ; then
-	echo $ARTIFACT$line >> pom.xml
+    if [[ $GROUP != *org.apache.cloudstack* ]] && [[ $GROUP != *com.cloud* ]] && [[ $ARTIFACT != cloudstack-service-console-proxy-rdpclient ]]; then
+            if [[ -z $VERSION ]] ; then
+               VERSION=LATEST
+               if [[ $GROUP == jstl ]] || [[ $ARTIFACT == mysql-connector-java ]] || [[ $GROUP == org.apache.axis ]]; then
+                 continue
+               fi
+            fi
+            echo "$GROUP $ARTIFACT $VERSION" >> deps.out
     fi
-  elif [ $1 == "version" ]; then
+  elif [[ $1 == "version" ]]; then
     #If version is a maven var, get the value from parent pom
     if [[ $2 == \$\{* ]]; then
-
-      VER=$(grep \<$(echo $2 | awk -v FS="(}|{)" '{print $2 }') ../../pom.xml | awk -v FS="(>|<)" '{print $3}')
-      if [[ "$VER" == "" ]]; then
-        ARTIFACT=org.apache.cloudstack
-      else
-        ARTIFACT="$ARTIFACT<version>$VER</version>"
-      fi
+      VERSION=$(grep \<$(echo $2 | awk -v FS="(}|{)" '{print $2 }') ../../pom.xml | awk -v FS="(>|<)" '{print $3}')
     elif [[ "$2" == "" ]]; then
-      ARTIFACT="$ARTIFACT<version>LATEST</version>"
+      VERSION="LATEST"
     else
-      ARTIFACT=$ARTIFACT$line
+      VERSION=$2
     fi
-  else
-    ARTIFACT=$ARTIFACT$line
+  elif [[ $1 == "artifactId" ]]; then
+    if [[ -z $ARTIFACT ]]; then
+      ARTIFACT=$2
+    fi
+  elif [[ $1 == "groupId" ]]; then
+     if [[ -z $GROUP ]]; then
+       GROUP=$2
+     fi
   fi
 
 done
@@ -47,10 +47,66 @@ while read line ; do
     NAME=$(echo $line | sed -e 's/.jar$//')
     VERSION=${NAME##*-}
     ARTIFACT=${NAME%-*}
-    GROUP=$(find ~/.m2/repository -name ${NAME}.pom -exec sed -n "1,/${ARTIFACT}/p" {} \; | tac | grep -m 1 -e "<groupId>"  | sed -e 's/^[[:space:]]*//' | tr -d '\r')
-    DATA="<dependency>${GROUP}<artifactId>${ARTIFACT}</artifactId><version>${VERSION}</version></dependency>"
-    echo $DATA >> pom.xml
+    GROUP=$(find ~/.m2/repository -name ${NAME}.pom -exec sed -n "1,/${ARTIFACT}/p" {} \; | tac | grep -m 1 -e "<groupId>"  | sed -e 's/^[[:space:]]*//' -e 's/\^M//' | tr -d '\r' | awk -v FS="(>|<)" '{print $3}')
+    DATA="${GROUP} ${ARTIFACT} ${VERSION}"
+    echo $DATA >> deps.out
 done < /tmp/resolvedPlugins
 
-#Finish dummy pom
-echo "</dependencies></project>" >> pom.xml
+cat deps.out | LANG=C sort -u > cleandeps.out
+
+LASTPOM=0
+echo '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><repositories><repository><id>mido-maven-public-releases</id><name>mido-maven-public-releases</name><url>http://cs-maven.midokura.com/releases</url></repository><repository><id>juniper-contrail</id><url>http://juniper.github.io/contrail-maven/snapshots</url></repository></repositories><dependencies>' > pom${LASTPOM}.xml
+while read line ; do
+  set -- $line
+
+  if [[ $2 == $LASTARTIFACT ]]; then
+    POMID=$(($POMID+1))
+    if [[ $POMID -gt $LASTPOM ]]; then
+       LASTPOM=$POMID
+       echo '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><repositories><repository><id>mido-maven-public-releases</id><name>mido-maven-public-releases</name><url>http://cs-maven.midokura.com/releases</url></repository><repository><id>juniper-contrail</id><url>http://juniper.github.io/contrail-maven/snapshots</url></repository></repositories><dependencies>' > pom${LASTPOM}.xml
+    fi
+  else
+    POMID=0
+  fi
+  LASTARTIFACT=$2
+  echo "<dependency><groupId>$1</groupId><artifactId>$2</artifactId><version>$3</version></dependency>" >> pom${POMID}.xml
+
+done < cleandeps.out
+
+RETURN_CODE=0
+for ((i=0;i<=$LASTPOM;i++))
+do
+  echo "</dependencies></project>" >> pom${i}.xml
+  mvn org.apache.maven.plugins:maven-dependency-plugin:resolve -f pom${i}.xml
+  if [[ $? -ne 0 ]]; then
+    RETURN_CODE=1
+  fi
+
+done
+
+#Run a few plugin goals to download some more deps
+
+#Hack to run maven-jaxb2-plugin generate, can be removed when we stop using such an old version...
+mkdir -p src/main/resources
+echo '<?xml version="1.0" encoding="utf-8" ?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"></xs:schema>' > src/main/resources/test.xsd
+
+
+declare -a arr=("maven-surefire-plugin test" "maven-pmd-plugin pmd" "maven-compiler-plugin compile" "maven-resources-plugin resources" "maven-checkstyle-plugin check" "maven-site-plugin attach-descriptor" "maven-surefire-plugin test" "maven-jar-plugin jar" "license-maven-plugin check" "maven-jgit-buildnumber-plugin extract-buildnumber" "maven-jaxb2-plugin generate" "maven-war-plugin war -DfailOnMissingWebXml=false" "gmaven-plugin compile")
+for i in "${arr[@]}"
+do
+    set -- $i
+    PLUGIN=$1
+    MOJO=$2
+    OPTION=$3
+    while read line ; do
+       set -- $line
+       JOBS="${JOBS} ${1}:${2}:${3}:${MOJO} $OPTION"
+    done < <(grep $PLUGIN cleandeps.out)
+done
+echo "Running $JOBS"
+mvn $JOBS -f pom0.xml
+
+
+rm -rf deps.out src target
+
+exit $RETURN_CODE


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

Posted by da...@apache.org.
Add apache license header to script

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

This closes #482


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

Branch: refs/heads/master
Commit: 6fd49e49a3c70c57355eeeb8af2656528da596e1
Parents: 4f098a1
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Sun Jun 21 04:35:14 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:27 2015 +0200

----------------------------------------------------------------------
 tools/travis/before_install.sh |  3 +++
 tools/travis/downloadDeps.sh   | 27 +++++++++++++++++++++++++--
 2 files changed, 28 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6fd49e49/tools/travis/before_install.sh
----------------------------------------------------------------------
diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh
index 69646a7..b0d33a1 100755
--- a/tools/travis/before_install.sh
+++ b/tools/travis/before_install.sh
@@ -97,6 +97,7 @@ done
 echo -e "\nDownloading Plugin dependencies"
 for ((i=0;i<$RETRY_COUNT;i++))
 do
+ #The output file is used on the next phase by the downloadDeps.sh script
  mvn org.apache.maven.plugins:maven-dependency-plugin:resolve-plugins | grep "Plugin Resolved:" | sort -u | awk '{print $4}' | tee /tmp/resolvedPlugins
  if [[ $? -eq 0 ]]; then
    echo -e "\nPlugin dependencies downloaded successfully"
@@ -120,9 +121,11 @@ do
    break;
  fi
  echo -e "\nDependency download failed"
+ #Print out errors from failed run
  cat /tmp/phase2 | grep -i -e "fail" -e "error" -e "exception"
  #Test DNS record
  getent hosts repo1.maven.org
  while ! nc -vzw 5 repo1.maven.org 80; do echo -e "\nFailed to connect to repo1.maven.org:80 will retry in 10 seconds"; sleep 10; done
+ echo -e "\nRetrying download"
 done
 cd ../..

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6fd49e49/tools/travis/downloadDeps.sh
----------------------------------------------------------------------
diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh
index 5d9a033..b4617ec 100755
--- a/tools/travis/downloadDeps.sh
+++ b/tools/travis/downloadDeps.sh
@@ -1,4 +1,26 @@
 #!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# This script should be used to install additional dependencies
+# This includes: installing ubuntu packages, custom services
+# or internet downloads.
+
+# Authored by Rafael da Fonseca <rs...@gmail.com>
 
 #Get all dependency blocks from all pom.xml files in the project
 for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/dependencies>/b;p;ba}' {} \; | grep -e "artifactId" -e "groupId" -e "version" -e "dependency\>" -e "exclusion\>" -e "exclusions\>"| sed -e 's/\^M//'); do
@@ -7,7 +29,6 @@ for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/
   set -- $(echo $line | awk -v FS="(>|<)" '{print $2, $3}')
 
   #Start processing data
-
   if [[ $1 == "dependency" ]]; then
     #Create new artifact dep
     unset ARTIFACT
@@ -18,10 +39,12 @@ for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/
     if [[ $GROUP != *org.apache.cloudstack* ]] && [[ $GROUP != *com.cloud* ]] && [[ $ARTIFACT != cloudstack-service-console-proxy-rdpclient ]]; then
             if [[ -z $VERSION ]] ; then
                VERSION=LATEST
+               #These dependencies don't support the LATEST keywork for some reason, and would cause mvn runs to file on dummy poms
                if [[ $GROUP == jstl ]] || [[ $ARTIFACT == mysql-connector-java ]] || [[ $GROUP == org.apache.axis ]]; then
                  continue
                fi
             fi
+            #Output resolved dependency to a file, to be picked up later
             echo "$GROUP $ARTIFACT $VERSION" >> deps.out
     fi
   elif [[ $1 == "version" ]]; then
@@ -89,7 +112,6 @@ do
   if [[ $? -ne 0 ]]; then
     RETURN_CODE=1
   fi
-
 done
 
 #Run a few plugin goals to download some more deps
@@ -113,6 +135,7 @@ do
     done < <(grep $PLUGIN cleandeps.out)
 done
 echo "Running $JOBS"
+#Call all the constructed plugin goals
 mvn $JOBS -f pom0.xml
 if [[ $? -ne 0 ]]; then
   RETURN_CODE=1


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

Posted by da...@apache.org.
Check return code on plugin runs

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/4f098a1b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4f098a1b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4f098a1b

Branch: refs/heads/master
Commit: 4f098a1b9057b10865fb92d85c362f93fdcec852
Parents: b9f5d38
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Sun Jun 21 04:09:04 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sun Jun 21 15:13:27 2015 +0200

----------------------------------------------------------------------
 tools/travis/downloadDeps.sh | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f098a1b/tools/travis/downloadDeps.sh
----------------------------------------------------------------------
diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh
index 6045feb..5d9a033 100755
--- a/tools/travis/downloadDeps.sh
+++ b/tools/travis/downloadDeps.sh
@@ -1,3 +1,6 @@
+#!/bin/bash
+
+#Get all dependency blocks from all pom.xml files in the project
 for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/dependencies>/b;p;ba}' {} \; | grep -e "artifactId" -e "groupId" -e "version" -e "dependency\>" -e "exclusion\>" -e "exclusions\>"| sed -e 's/\^M//'); do
 
   #Tokenize values
@@ -11,7 +14,7 @@ for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/
     unset VERSION
     unset GROUP
   elif [[ $1 == "/dependency" ]]; then
-    #Filter out project modules interdependencies and noredist artifacts
+    #Filter out project modules interdependencies
     if [[ $GROUP != *org.apache.cloudstack* ]] && [[ $GROUP != *com.cloud* ]] && [[ $ARTIFACT != cloudstack-service-console-proxy-rdpclient ]]; then
             if [[ -z $VERSION ]] ; then
                VERSION=LATEST
@@ -25,21 +28,23 @@ for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/
     #If version is a maven var, get the value from parent pom
     if [[ $2 == \$\{* ]]; then
       VERSION=$(grep \<$(echo $2 | awk -v FS="(}|{)" '{print $2 }') ../../pom.xml | awk -v FS="(>|<)" '{print $3}')
+    #If version tag is empty, add LATEST to avoid maven errors
     elif [[ "$2" == "" ]]; then
       VERSION="LATEST"
     else
       VERSION=$2
     fi
   elif [[ $1 == "artifactId" ]]; then
+    #This avoids exclusions inside dependency block to overwrite original dependency
     if [[ -z $ARTIFACT ]]; then
       ARTIFACT=$2
     fi
   elif [[ $1 == "groupId" ]]; then
+    #This avoids exclusions inside dependency block to overwrite original dependency
      if [[ -z $GROUP ]]; then
        GROUP=$2
      fi
   fi
-
 done
 
 #Add the resolved plugins to properly download their dependencies
@@ -52,17 +57,21 @@ while read line ; do
     echo $DATA >> deps.out
 done < /tmp/resolvedPlugins
 
+#Remove duplicates and sort them, LANG export is needed to fix some sorting issue, sorting is needed for later function that relies on sorted input
 cat deps.out | LANG=C sort -u > cleandeps.out
 
+#Define index of pomfiles, to avoid duplicate deps with different versions in pom.xml, several poms are created in case of more than one version of same artifact
 LASTPOM=0
 echo '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><repositories><repository><id>mido-maven-public-releases</id><name>mido-maven-public-releases</name><url>http://cs-maven.midokura.com/releases</url></repository><repository><id>juniper-contrail</id><url>http://juniper.github.io/contrail-maven/snapshots</url></repository></repositories><dependencies>' > pom${LASTPOM}.xml
 while read line ; do
   set -- $line
-
+  #This relies on correct sorting, and distributes different versions of same dependency througout different pom files
   if [[ $2 == $LASTARTIFACT ]]; then
     POMID=$(($POMID+1))
+    #If value is greater than current number of poms, create a new one
     if [[ $POMID -gt $LASTPOM ]]; then
        LASTPOM=$POMID
+       #This outputs the necessary structure to start a pom and also defines the extra repositories
        echo '<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.apache.cloudstack</groupId><artifactId>travis-build-deps</artifactId><name>Download Deps for Travis CI</name><version>1</version><repositories><repository><id>mido-maven-public-releases</id><name>mido-maven-public-releases</name><url>http://cs-maven.midokura.com/releases</url></repository><repository><id>juniper-contrail</id><url>http://juniper.github.io/contrail-maven/snapshots</url></repository></repositories><dependencies>' > pom${LASTPOM}.xml
     fi
   else
@@ -70,7 +79,6 @@ while read line ; do
   fi
   LASTARTIFACT=$2
   echo "<dependency><groupId>$1</groupId><artifactId>$2</artifactId><version>$3</version></dependency>" >> pom${POMID}.xml
-
 done < cleandeps.out
 
 RETURN_CODE=0
@@ -90,7 +98,7 @@ done
 mkdir -p src/main/resources
 echo '<?xml version="1.0" encoding="utf-8" ?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"></xs:schema>' > src/main/resources/test.xsd
 
-
+#Declare plugin tests to run
 declare -a arr=("maven-surefire-plugin test" "maven-pmd-plugin pmd" "maven-compiler-plugin compile" "maven-resources-plugin resources" "maven-checkstyle-plugin check" "maven-site-plugin attach-descriptor" "maven-surefire-plugin test" "maven-jar-plugin jar" "license-maven-plugin check" "maven-jgit-buildnumber-plugin extract-buildnumber" "maven-jaxb2-plugin generate" "maven-war-plugin war -DfailOnMissingWebXml=false" "gmaven-plugin compile")
 for i in "${arr[@]}"
 do
@@ -98,6 +106,7 @@ do
     PLUGIN=$1
     MOJO=$2
     OPTION=$3
+    #Get every listed version of the plugin and make a run for each version
     while read line ; do
        set -- $line
        JOBS="${JOBS} ${1}:${2}:${3}:${MOJO} $OPTION"
@@ -105,8 +114,11 @@ do
 done
 echo "Running $JOBS"
 mvn $JOBS -f pom0.xml
+if [[ $? -ne 0 ]]; then
+  RETURN_CODE=1
+fi
 
-
+#Cleanup some files created in the run
 rm -rf deps.out src target
 
 exit $RETURN_CODE