Install bundler from gems.
Previously on Debian based machines we attempted to install bundler from apt and from gems. This worked on precise because the two package names are different. It does not work on trusty because the package names are the same and puppet complains that the namevar is duplicated and fails. Fix this by removing all apt based bundler instalations. We will install it only from gems and only on "thick" slaves. We do not need this on devstack slaves because devstack can install it for itself if it needs it. Note, this changes the path to the `bundle` executable. We were using it out of /usr/bin/bundle but a gem install will go in /usr/local/bin/bundle on ubuntu and /usr/bin/bundle on centos. To keep the chef jobs happy with this remove the explicit paths to bundle and rely on $PATH to find it for us regardless of the platform. Change-Id: Ic1f2158b923c5116f473f5d21250da69809b292d
This commit is contained in:
parent
525277e8f7
commit
3d26413212
@ -55,15 +55,6 @@ class jenkins::params {
|
||||
$memcached_package = 'memcached'
|
||||
$ruby1_9_1_package = 'ruby1.9.1'
|
||||
$ruby1_9_1_dev_package = 'ruby1.9.1-dev'
|
||||
|
||||
# will install ruby-bundler for Ubuntu Precise
|
||||
# and bundler for Debian or newer Ubuntu distros
|
||||
if $::lsbdistcodename == 'precise' {
|
||||
$ruby_bundler_package = 'ruby-bundler'
|
||||
}
|
||||
else {
|
||||
$ruby_bundler_package = 'bundler'
|
||||
}
|
||||
$php5_mcrypt_package = 'php5-mcrypt'
|
||||
# For [tooz, taskflow, nova] using zookeeper in unit tests
|
||||
$zookeeper_package = 'zookeeperd'
|
||||
|
@ -81,10 +81,6 @@ class jenkins::slave(
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { $::jenkins::params::ruby_bundler_package:
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { 'openjdk-6-jre-headless':
|
||||
ensure => purged,
|
||||
require => Package[$::jenkins::params::jdk_package],
|
||||
|
@ -8,8 +8,8 @@
|
||||
cp test/environment.yml.travis-ci test/environment.yml
|
||||
mkdir .bundled_gems
|
||||
export GEM_HOME=`pwd`/.bundled_gems
|
||||
ruby1.9.1 /usr/bin/bundle --without development
|
||||
ruby1.9.1 /usr/bin/bundle exec rake
|
||||
bundle --without development
|
||||
bundle exec rake
|
||||
|
||||
publishers:
|
||||
- console-log
|
||||
|
@ -65,12 +65,12 @@
|
||||
- shell: |
|
||||
#!/bin/bash -xe
|
||||
mkdir -p .cookbooks .bundle
|
||||
ruby1.9.1 /usr/bin/bundle config --global jobs $(nproc)
|
||||
ruby1.9.1 /usr/bin/bundle install --path=.bundle
|
||||
bundle config --global jobs $(nproc)
|
||||
bundle install --path=.bundle
|
||||
# Validates cookbooks
|
||||
ruby1.9.1 /usr/bin/bundle exec berks install --path=.cookbooks
|
||||
bundle exec berks install --path=.cookbooks
|
||||
# Validates roles
|
||||
ruby1.9.1 /usr/bin/bundle exec spiceweasel infrastructure.yml --debug
|
||||
bundle exec spiceweasel infrastructure.yml --debug
|
||||
|
||||
publishers:
|
||||
- console-log
|
||||
|
@ -122,8 +122,8 @@
|
||||
builders:
|
||||
- shell: |
|
||||
mkdir -p .bundle
|
||||
ruby1.9.1 /usr/bin/bundle config --global jobs $(nproc)
|
||||
ruby1.9.1 /usr/bin/bundle install --path=.bundle
|
||||
bundle config --global jobs $(nproc)
|
||||
bundle install --path=.bundle
|
||||
|
||||
- builder:
|
||||
name: chef-berkshelf-prep
|
||||
@ -132,10 +132,10 @@
|
||||
#!/bin/bash -x
|
||||
grep -E .*berkshelf.*3\.\d*\.\d*.* Gemfile
|
||||
if [ $? -eq 0 ]; then
|
||||
ruby1.9.1 /usr/bin/bundle exec berks vendor .cookbooks
|
||||
bundle exec berks vendor .cookbooks
|
||||
else
|
||||
mkdir -p .cookbooks
|
||||
ruby1.9.1 /usr/bin/bundle exec berks install --path=.cookbooks
|
||||
bundle exec berks install --path=.cookbooks
|
||||
fi
|
||||
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
||||
if [ -z $COOKBOOK ]; then
|
||||
@ -148,9 +148,9 @@
|
||||
builders:
|
||||
- shell: |
|
||||
if grep rubocop: Strainerfile; then
|
||||
ruby1.9.1 /usr/bin/bundle exec strainer test --cookbooks-path=.cookbooks --only=rubocop
|
||||
bundle exec strainer test --cookbooks-path=.cookbooks --only=rubocop
|
||||
else
|
||||
ruby1.9.1 /usr/bin/bundle exec rubocop
|
||||
bundle exec rubocop
|
||||
fi
|
||||
|
||||
- builder:
|
||||
@ -158,9 +158,9 @@
|
||||
builders:
|
||||
- shell: |
|
||||
if grep foodcritic: Strainerfile; then
|
||||
ruby1.9.1 /usr/bin/bundle exec strainer test --cookbooks-path=.cookbooks --only=foodcritic
|
||||
bundle exec strainer test --cookbooks-path=.cookbooks --only=foodcritic
|
||||
else
|
||||
ruby1.9.1 /usr/bin/bundle exec foodcritic -f any -t ~FC003 -t ~FC023 .
|
||||
bundle exec foodcritic -f any -t ~FC003 -t ~FC023 .
|
||||
fi
|
||||
|
||||
- builder:
|
||||
@ -169,9 +169,9 @@
|
||||
- shell: |
|
||||
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
||||
if grep chefspec: Strainerfile; then
|
||||
ruby1.9.1 /usr/bin/bundle exec strainer test --cookbooks-path=.cookbooks --only=chefspec
|
||||
bundle exec strainer test --cookbooks-path=.cookbooks --only=chefspec
|
||||
else
|
||||
ruby1.9.1 /usr/bin/bundle exec rspec .cookbooks/$COOKBOOK/spec
|
||||
bundle exec rspec .cookbooks/$COOKBOOK/spec
|
||||
fi
|
||||
|
||||
- builder:
|
||||
|
@ -130,15 +130,6 @@ class openstack_project::jenkins_params {
|
||||
}
|
||||
$ruby1_9_1_package = 'ruby1.9.1'
|
||||
$ruby1_9_1_dev_package = 'ruby1.9.1-dev'
|
||||
|
||||
# will install ruby-bundler for Ubuntu Precise
|
||||
# and bundler for Debian or newer Ubuntu distros
|
||||
if ($::lsbdistcodename == 'precise') {
|
||||
$ruby_bundler_package = 'ruby-bundler'
|
||||
}
|
||||
else {
|
||||
$ruby_bundler_package = 'bundler'
|
||||
}
|
||||
# Common Lisp interpreter, used for cl-openstack-client
|
||||
$sbcl_package = 'sbcl'
|
||||
$sqlite_package = 'sqlite3'
|
||||
|
Loading…
Reference in New Issue
Block a user