You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2014/09/22 21:44:46 UTC

[47/50] git commit: updated refs/heads/master to 1290e10

CLOUDSTACK-7143: don't call rvm from build

It is simpler to expect that rvm setup is done outside of this build.
The buildacloud.org jenkins has rvm installed/enabled by default so
does not invoke rvm.


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

Branch: refs/heads/master
Commit: 362946c52e21b70b42b716c8d60431432223f22d
Parents: a8500ed
Author: Leo Simons <ls...@schubergphilis.com>
Authored: Wed Sep 17 12:24:00 2014 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Sep 22 21:38:17 2014 +0200

----------------------------------------------------------------------
 tools/appliance/README.md | 26 +++++++++++++++++++++++++-
 tools/appliance/build.sh  | 15 ++++-----------
 2 files changed, 29 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/362946c5/tools/appliance/README.md
----------------------------------------------------------------------
diff --git a/tools/appliance/README.md b/tools/appliance/README.md
index 8c51c9c..411fd09 100644
--- a/tools/appliance/README.md
+++ b/tools/appliance/README.md
@@ -40,12 +40,36 @@ Note, gem may require gcc-4.2, make sure link exists:
 
     sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
 
+# Setting up jenkins (CI) builds
+
+All the tools listed above are expected to be available. If you follow
+
+    http://rvm.io/integration/jenkins
+
+then you'll need to do a bit of logic to load RVM in jenkins. In the
+build script you put into jenkins, start it with
+```
+#!/bin/bash -l
+```
+
+to ensure a login shell, then add something like
+```
+# inspired by https://github.com/CloudBees-community/rubyci-clickstart/blob/master/bin/run-ci
+# also see https://rvm.io/integration/jenkins
+# .rvmrc won't get trusted/auto-loaded by jenkins by default
+export VAGRANT_HOME=$HOME/.vagrant.d-release-cloudstack
+rvm use ruby-1.9.3@vagrant-release-cloudstack --create
+# do not use --deployment since that requires Gemfile.lock...and we prefer an up-to-date veewee
+bundle_args="--path vendor/bundle"
+```
+
+
 # How to build SystemVMs automatically
 
 Just run build.sh, it will export archived appliances for KVM, XenServer,
 VMWare and HyperV in `dist`:
 
-    sh build.sh [systemvmtemplate|systemvmtemplate64]
+    bash build.sh [systemvmtemplate|systemvmtemplate64]
 
 # Building SystemVM template appliance manually
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/362946c5/tools/appliance/build.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh
index f9c6b75..7880a1f 100755
--- a/tools/appliance/build.sh
+++ b/tools/appliance/build.sh
@@ -97,6 +97,9 @@ if [[ "${VEEWEE_ARGS}" == "" && "${TRACE}" == "1" ]]; then
 fi
 VEEWEE_BUILD_ARGS="${VEEWEE_BUILD_ARGS:-${VEEWEE_ARGS} --nogui --auto}"
 
+# any arguments to pass along to the 'bundle install' command
+BUNDLE_ARGS="${BUNDLE_ARGS:-}"
+
 # which veewee definition to use
 appliance="${1:-${appliance:-systemvmtemplate}}"
 
@@ -263,17 +266,7 @@ function create_definition() {
 }
 
 function setup_ruby() {
-  local bundle_args=
-  if [[ ! -z "${JENKINS_HOME}" ]]; then
-    # inspired by https://github.com/CloudBees-community/rubyci-clickstart/blob/master/bin/run-ci
-    # also see https://rvm.io/integration/jenkins
-    # .rvmrc won't get trusted/auto-loaded by jenkins by default
-    export VAGRANT_HOME=$HOME/.vagrant.d-release-cloudstack
-    rvm use ruby-1.9.3@vagrant-release-cloudstack --create
-    # do not use --deployment since that requires Gemfile.lock...and we prefer an up-to-date veewee
-    bundle_args="--path vendor/bundle"
-  fi
-  bundle check || bundle install ${bundle_args}
+  bundle check || bundle install ${BUNDLE_ARGS}
 }
 
 function stop_vbox() {