cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaya...@apache.org
Subject [44/50] [abbrv] git commit: updated refs/heads/dhcpoffload to 45721ae
Date Mon, 29 Jun 2015 07:01:05 GMT
Reduce script running time around 80% This resolves the performance penalty introduced by adding
the midonet repo

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #530


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

Branch: refs/heads/dhcpoffload
Commit: bdd42a4157a65c2cb02233adfd99f5ebba98c571
Parents: c0bf00c
Author: Rafael da Fonseca <rsafonseca@gmail.com>
Authored: Thu Jun 25 16:57:51 2015 +0200
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Fri Jun 26 00:00:13 2015 +0200

----------------------------------------------------------------------
 tools/travis/downloadDeps.sh | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bdd42a41/tools/travis/downloadDeps.sh
----------------------------------------------------------------------
diff --git a/tools/travis/downloadDeps.sh b/tools/travis/downloadDeps.sh
index b4617ec..c05e5f5 100755
--- a/tools/travis/downloadDeps.sh
+++ b/tools/travis/downloadDeps.sh
@@ -85,7 +85,10 @@ 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
+#Create first 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${LASTPOM}.xml
+#Create pom for dependencies not on central repo, this is done separately to not adversely
impact performance on downloading the majority of deps
+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>'
> pomX.xml
 while read line ; do
   set -- $line
   #This relies on correct sorting, and distributes different versions of same dependency
througout different pom files
@@ -95,16 +98,21 @@ while read line ; do
     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
+       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${LASTPOM}.xml
     fi
   else
     POMID=0
   fi
   LASTARTIFACT=$2
-  echo "<dependency><groupId>$1</groupId><artifactId>$2</artifactId><version>$3</version></dependency>"
>> pom${POMID}.xml
+  if [[ $1 == org.midonet ]] || [[ $1 == net.juniper* ]]; then
+    echo "<dependency><groupId>$1</groupId><artifactId>$2</artifactId><version>$3</version></dependency>"
>> pomX.xml
+  else
+    echo "<dependency><groupId>$1</groupId><artifactId>$2</artifactId><version>$3</version></dependency>"
>> pom${POMID}.xml
+  fi
 done < cleandeps.out
 
 RETURN_CODE=0
+#Close and resolve all pom files
 for ((i=0;i<=$LASTPOM;i++))
 do
   echo "</dependencies></project>" >> pom${i}.xml
@@ -113,6 +121,9 @@ do
     RETURN_CODE=1
   fi
 done
+#Close and resolve external deps pom file
+echo "</dependencies></project>" >> pomX.xml
+mvn org.apache.maven.plugins:maven-dependency-plugin:resolve -f pomX.xml
 
 #Run a few plugin goals to download some more deps
 


Mime
View raw message