diff options
author | C.J. Collier <cjcollier@linuxfoundation.org> | 2016-07-19 15:15:09 -0700 |
---|---|---|
committer | C.J. Collier <cjcollier@linuxfoundation.org> | 2016-07-20 16:46:54 -0700 |
commit | 2d4082b259896d89acbf1479a6c977cf09d0172f (patch) | |
tree | c850ebbc6930aaac1e778098f8a9297f8127bc1e | |
parent | a96e385f192653e3f681a7ce183f7f76c7672d0f (diff) |
prefetch maven
* call maven install function
* maven install function installs from file in /vagrant
Jenkins will be modified to point to this pre-installed maven. This
will eliminate many problems caused by an inability to fetch common
files.
Another solution would be to host a caching proxy within Vexxhost and
set the http_proxy and https_proxy environment variables to use this
host.
Change-Id: I76d1f3c2526b45dbe0fa4b2a17d3e30d434092ce
Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
-rw-r--r-- | vagrant/basebuild/bootstrap.sh | 1 | ||||
-rw-r--r-- | vagrant/lib/bootstrap-functions.sh | 10 |
2 files changed, 5 insertions, 6 deletions
diff --git a/vagrant/basebuild/bootstrap.sh b/vagrant/basebuild/bootstrap.sh index 4aea50d65..87eb3860a 100644 --- a/vagrant/basebuild/bootstrap.sh +++ b/vagrant/basebuild/bootstrap.sh @@ -7,6 +7,7 @@ set -e . /vagrant/lib/bootstrap-functions.sh do_setup +do_mvn_install # record the bootstrap.sh checksum sha1sum $0 > /etc/bootstrap.sha diff --git a/vagrant/lib/bootstrap-functions.sh b/vagrant/lib/bootstrap-functions.sh index 84e659593..027c69d04 100644 --- a/vagrant/lib/bootstrap-functions.sh +++ b/vagrant/lib/bootstrap-functions.sh @@ -5,14 +5,12 @@ do_setup() { } do_mvn_install() { - MAVEN_MIRROR=apache.mirrors.tds.net MAVEN_VERSION=3.3.9 - MAVEN_RELEASE=http://${MAVEN_MIRROR}/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz + MAVEN_FILENAME=apache-maven-${MAVEN_VERSION}-bin.tar.gz MAVEN_HOME=/opt/apache/maven - mkdir -p /opt/apache/maven - wget -O - ${MAVEN_RELEASE} | \ - tar xz -C ${MAVEN_HOME} --strip-components 1 + mkdir -p ${MAVEN_HOME} + tar -C ${MAVEN_HOME} --strip-components 1 -xzf /vagrant/${MAVEN_FILENAME} } @@ -223,7 +221,7 @@ rh_install_pkgs() { OUTPUT=$(rpm -qa epel-release) if [ -z "$OUTPUT" ] then - yum install -q -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + yum install -q -y /vagrant/epel-release-latest-7.noarch.rpm fi # Install components to build Ganglia modules |