Skip to content

Commit

Permalink
clean up the kitchen
Browse files Browse the repository at this point in the history
* update platforms for linuxes and versions intended to be supported;
  removes freebsd because it is not a platform supported initially
* move the apt/yum default updating to the new builder cookbook default
  recipe where it can be handled with a case statement for platform
* make the log level and build output configurable via attributes in the
  builder cookbook

Signed-off-by: Robb Kidd <robb@thekidds.org>
  • Loading branch information
robbkidd committed Apr 12, 2018
1 parent 06816fe commit f89ad7e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 28 deletions.
28 changes: 9 additions & 19 deletions omnibus/.kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,17 @@ driver:
provisioner:
name: chef_zero

# only run one of these at a time if you are interested in using the
# omnibus package produced; the build process begins by cleaning up
# prior built artifacts in pkg/ which is shared across VMs
platforms:
- name: centos-7.1
run_list: yum-epel::default
- name: centos-6.6
run_list: yum-epel::default
- name: centos-5.11
run_list: yum-epel::default
- name: debian-7.8
run_list: apt::default
- name: debian-6.0.10
run_list: apt::default
- name: freebsd-10.1
run_list: freebsd::portsnap
- name: freebsd-9.3
run_list:
- freebsd::portsnap
- freebsd::pkgng
- name: centos-7
- name: centos-6
- name: debian-9
- name: debian-8
- name: debian-7
- name: ubuntu-16.04
- name: ubuntu-14.04
run_list: apt::default
- name: ubuntu-12.04
run_list: apt::default

suites:
- name: default
Expand Down
6 changes: 0 additions & 6 deletions omnibus/Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,3 @@ cookbook "chef-workstation-builder",

# Uncomment to use the latest version of the Omnibus cookbook from GitHub
# cookbook 'omnibus', github: 'opscode-cookbooks/omnibus'

group :integration do
cookbook "apt", "~> 2.8"
cookbook "freebsd", "~> 0.3"
cookbook "yum-epel", "~> 0.6"
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
default['chef-workstation-builder']['log_level'] = 'info'
default['chef-workstation-builder']['live_stream'] = true
4 changes: 3 additions & 1 deletion omnibus/cookbooks/chef-workstation-builder/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
long_description 'Builds a Chef Workstation package'
version '1.0.0'

depends 'omnibus'
depends 'omnibus'
depends 'apt', '~> 2.8'
depends 'yum-epel', '~> 0.6'
13 changes: 11 additions & 2 deletions omnibus/cookbooks/chef-workstation-builder/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
# ensure packages available up-to-date
case node['platform_family']
when 'debian'
include_recipe 'apt::default'
when 'rhel'
include_recipe 'yum-epel::default'
end

include_recipe 'omnibus::default'

execute 'fix bundler directory permissions' do
command "chown -R #{node['omnibus']['build_user']} #{node['omnibus']['build_user_home']}/.bundle"
only_if { Dir.exist? "#{node['omnibus']['build_user_home']}/.bundle" }
end

omnibus_build 'chef-workstation' do
environment 'HOME' => node['omnibus']['build_user_home']
project_dir node['omnibus']['build_dir']
log_level :internal
live_stream true
log_level node['chef-workstation-builder']['log_level'].to_sym
live_stream node['chef-workstation-builder']['live_stream']
config_overrides(
append_timestamp: true
)
Expand Down

0 comments on commit f89ad7e

Please sign in to comment.