Merge "Install bundler from gems."

This commit is contained in:
Jenkins 2014-08-20 22:10:10 +00:00 committed by Gerrit Code Review
commit 7c9563337d
6 changed files with 16 additions and 38 deletions

View File

@ -55,15 +55,6 @@ class jenkins::params {
$memcached_package = 'memcached' $memcached_package = 'memcached'
$ruby1_9_1_package = 'ruby1.9.1' $ruby1_9_1_package = 'ruby1.9.1'
$ruby1_9_1_dev_package = 'ruby1.9.1-dev' $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' $php5_mcrypt_package = 'php5-mcrypt'
# For [tooz, taskflow, nova] using zookeeper in unit tests # For [tooz, taskflow, nova] using zookeeper in unit tests
$zookeeper_package = 'zookeeperd' $zookeeper_package = 'zookeeperd'

View File

@ -81,10 +81,6 @@ class jenkins::slave(
ensure => present, ensure => present,
} }
package { $::jenkins::params::ruby_bundler_package:
ensure => present,
}
package { 'openjdk-6-jre-headless': package { 'openjdk-6-jre-headless':
ensure => purged, ensure => purged,
require => Package[$::jenkins::params::jdk_package], require => Package[$::jenkins::params::jdk_package],

View File

@ -8,8 +8,8 @@
cp test/environment.yml.travis-ci test/environment.yml cp test/environment.yml.travis-ci test/environment.yml
mkdir .bundled_gems mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems export GEM_HOME=`pwd`/.bundled_gems
ruby1.9.1 /usr/bin/bundle --without development bundle --without development
ruby1.9.1 /usr/bin/bundle exec rake bundle exec rake
publishers: publishers:
- console-log - console-log

View File

@ -65,12 +65,12 @@
- shell: | - shell: |
#!/bin/bash -xe #!/bin/bash -xe
mkdir -p .cookbooks .bundle mkdir -p .cookbooks .bundle
ruby1.9.1 /usr/bin/bundle config --global jobs $(nproc) bundle config --global jobs $(nproc)
ruby1.9.1 /usr/bin/bundle install --path=.bundle bundle install --path=.bundle
# Validates cookbooks # Validates cookbooks
ruby1.9.1 /usr/bin/bundle exec berks install --path=.cookbooks bundle exec berks install --path=.cookbooks
# Validates roles # Validates roles
ruby1.9.1 /usr/bin/bundle exec spiceweasel infrastructure.yml --debug bundle exec spiceweasel infrastructure.yml --debug
publishers: publishers:
- console-log - console-log

View File

@ -122,8 +122,8 @@
builders: builders:
- shell: | - shell: |
mkdir -p .bundle mkdir -p .bundle
ruby1.9.1 /usr/bin/bundle config --global jobs $(nproc) bundle config --global jobs $(nproc)
ruby1.9.1 /usr/bin/bundle install --path=.bundle bundle install --path=.bundle
- builder: - builder:
name: chef-berkshelf-prep name: chef-berkshelf-prep
@ -132,10 +132,10 @@
#!/bin/bash -x #!/bin/bash -x
grep -E .*berkshelf.*3\.\d*\.\d*.* Gemfile grep -E .*berkshelf.*3\.\d*\.\d*.* Gemfile
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
ruby1.9.1 /usr/bin/bundle exec berks vendor .cookbooks bundle exec berks vendor .cookbooks
else else
mkdir -p .cookbooks mkdir -p .cookbooks
ruby1.9.1 /usr/bin/bundle exec berks install --path=.cookbooks bundle exec berks install --path=.cookbooks
fi fi
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\') COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
if [ -z $COOKBOOK ]; then if [ -z $COOKBOOK ]; then
@ -148,9 +148,9 @@
builders: builders:
- shell: | - shell: |
if grep rubocop: Strainerfile; then 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 else
ruby1.9.1 /usr/bin/bundle exec rubocop bundle exec rubocop
fi fi
- builder: - builder:
@ -158,9 +158,9 @@
builders: builders:
- shell: | - shell: |
if grep foodcritic: Strainerfile; then 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 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 fi
- builder: - builder:
@ -169,9 +169,9 @@
- shell: | - shell: |
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\') COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
if grep chefspec: Strainerfile; then 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 else
ruby1.9.1 /usr/bin/bundle exec rspec .cookbooks/$COOKBOOK/spec bundle exec rspec .cookbooks/$COOKBOOK/spec
fi fi
- builder: - builder:

View File

@ -130,15 +130,6 @@ class openstack_project::jenkins_params {
} }
$ruby1_9_1_package = 'ruby1.9.1' $ruby1_9_1_package = 'ruby1.9.1'
$ruby1_9_1_dev_package = 'ruby1.9.1-dev' $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 # Common Lisp interpreter, used for cl-openstack-client
$sbcl_package = 'sbcl' $sbcl_package = 'sbcl'
$sqlite_package = 'sqlite3' $sqlite_package = 'sqlite3'