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.
This commit is contained in:
Leo Simons 2014-09-17 12:24:00 +02:00 committed by Rohit Yadav
parent a8500ed73e
commit 362946c52e
2 changed files with 29 additions and 12 deletions

View File

@ -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

View File

@ -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() {