cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [29/50] git commit: updated refs/heads/master to 1290e10
Date Mon, 22 Sep 2014 19:44:28 GMT
CLOUDSTACK-7143: attempt at a reliable way to set up rvm/bundler on jenkins


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

Branch: refs/heads/master
Commit: a56392b5e4769d1b3e8cce0a8a1da89e11a24c46
Parents: a7d07bf
Author: Leo Simons <lsimons@schubergphilis.com>
Authored: Tue Jul 22 13:13:54 2014 +0200
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Sep 22 21:38:14 2014 +0200

----------------------------------------------------------------------
 tools/appliance/build.sh | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a56392b5/tools/appliance/build.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh
index 9ae83f1..282472d 100755
--- a/tools/appliance/build.sh
+++ b/tools/appliance/build.sh
@@ -252,9 +252,22 @@ function create_definition() {
   add_on_exit rm -f cloud_scripts_shar_archive.sh
 }
 
+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
+    bundle_args="--deployment"
+  fi
+  bundle check || bundle install ${bundle_args}
+}
+
 function prepare() {
   log INFO "preparing for build"
-  bundle
+  setup_ruby
   rm -rf dist *.ova *.vhd *.vdi *.qcow* *.bz2 *.vmdk *.ovf
   mkdir dist
 }


Mime
View raw message