Fix Berkshelf 3.x GeCode 3.x dependency

Berkshelf 3.x requires GeCode 3.x.  Default is to install
wrapper gem dep-selector-libgecode which will compile the 3.x
GeCode libraries.  This is a very large project to compile and
will fail at times when memory or cpus are limited.

To work around this, there is a dep-selector-libgecode flag,
USE_SYSTEM_GECODE that will allow the gem to just use the GeCode
system libraries.  The 3.x version of the GeCode libraries are default
on precise.  The 4.x version of GeCode on trusty is not compatible
with Berkshelf 3.x.

* Use precise for cookbook gates until Berkshelf/Chef DK support trusty
* Install the precise GeCode 3.x system libraries when using
Berkshelf 3.x.

Change-Id: I19d16e06e72aff090771c46c15b2b8de164988c8
Closes-Bug: #1357439
This commit is contained in:
Mark Vanderwiel 2014-08-27 10:21:12 -05:00
parent 8dd8fa366c
commit 6c60be63c9
2 changed files with 12 additions and 1 deletions

View File

@ -126,8 +126,16 @@
name: chef-bundler-prep
builders:
- shell: |
#!/bin/bash -x
mkdir -p .bundle
bundle install --path=.bundle --jobs 1 --retry 3 --verbose
grep -E .*berkshelf.*3\.\d*\.\d*.* Gemfile
if [ $? -eq 0 ]; then
# For Berkshelf 3.x use the system gecode 3.x libraries
sudo apt-get install -y libgecode-dev
USE_SYSTEM_GECODE=1 bundle install --path=.bundle --jobs 1 --retry 3 --verbose
else
bundle install --path=.bundle --jobs 1 --retry 3 --verbose
fi
- builder:
name: chef-berkshelf-prep

View File

@ -445,6 +445,9 @@ jobs:
# We're planning on Puppet 2.7 support to Spring 2015.
- name: ^.*puppet-unit-2.7$
parameter-function: set_node_options_default_precise
# Berkshelf 3.x requires GeCode 3.x on precise.
- name: ^gate-.*-chef-(lint|style|unit)$
parameter-function: set_node_options_default_precise
# tempest and d-g branchless tests need to only run on master
# (needs to be early to not impact non-voting stanzas later)
- name: ^(?!periodic-).*(-icehouse|-havana)$