From 6c60be63c9a4f4611e5957508dd339f777012e5d Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Wed, 27 Aug 2014 10:21:12 -0500 Subject: [PATCH] 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 --- .../files/jenkins_job_builder/config/macros.yaml | 10 +++++++++- modules/openstack_project/files/zuul/layout.yaml | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml index 2c8e403020..37afffb53a 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml @@ -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 diff --git a/modules/openstack_project/files/zuul/layout.yaml b/modules/openstack_project/files/zuul/layout.yaml index bc0f92e268..41ca893aef 100644 --- a/modules/openstack_project/files/zuul/layout.yaml +++ b/modules/openstack_project/files/zuul/layout.yaml @@ -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)$