Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the build config #58

Merged
merged 4 commits into from
Jan 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions .kitchen.appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
driver:
name: localhost
clean_up_on_destroy: false

platforms:
- name: windows
15 changes: 15 additions & 0 deletions .kitchen.circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
driver:
name: docker
privileged: true

platforms:
- name: ubuntu-15.10
- name: ubuntu-14.04
- name: ubuntu-12.04
- name: debian-8
- name: debian-7
- name: debian-6
- name: centos-7
- name: centos-6
- name: fedora-22
18 changes: 3 additions & 15 deletions .kitchen.travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
---
driver:
name: digitalocean
region: nyc3
name: localhost
clean_up_on_destroy: false

platforms:
- name: ubuntu-14-04-x64
- name: ubuntu-12-04-x64
- name: debian-7-0-x64
# The Debian 6 Digital Ocean image doesn't have sudo installed
- name: debian-6-0-x64
provisioner:
sudo_command:
verifier:
sudo_command:
- name: centos-6-5-x64
- name: fedora-21-x64
- name: macosx
driver:
name: localhost
32 changes: 18 additions & 14 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ provisioner:
platforms:
- name: ubuntu-14.04
- name: ubuntu-12.04
- name: debian-7.8
- name: debian-8.2
- name: debian-7.9
- name: debian-6.0.10
- name: centos-6.6
- name: fedora-21
# - name: macosx-10.8
# - name: macosx-10.9
- name: centos-7.2
- name: centos-6.7
- name: fedora-22
- name: macosx-10.10
driver:
box: roboticcheese/macosx-10.10
Expand All @@ -40,16 +40,20 @@ suites:
chef_dk:
package_url: https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.3.4-1_amd64.deb
excludes:
- ubuntu-15.10
- ubuntu-12.04
- debian-7.8
- debian-8.2
- debian-8
- debian-7.9
- debian-7
- debian-6.0.10
- centos-6.6
- fedora-21
- debian-6
- centos-7.2
- centos-7
- centos-6.7
- centos-6
- fedora-22
- macosx-10.10
- windows-2012
- ubuntu-12-04-x64
- debian-7-0-x64
- debian-6-0-x64
- centos-6-5-x64
- fedora-21-x64
- macosx
- windows-2012
- windows
17 changes: 6 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
language: objective-c

branches:
only:
- master

install:
# Need Berkshelf to resolve dependencies for the local Chef run
- curl -L https://www.opscode.com/chef/install.sh | sudo bash -s -- -P chefdk
Expand All @@ -11,19 +15,10 @@ install:
- curl -L https://www.opscode.com/chef/install.sh | sudo bash
- sudo chef-client -z -c test/client.rb -j test/dna.json
# Then the build can continue on with ChefDK
- chef exec bundle install --without=development
- chef exec bundle install --without=development integration

before_script:
# Pending ENV support in Kitchen's Rake tasks and not just the CLI
- cp .kitchen.travis.yml .kitchen.local.yml
- echo -e $DIGITALOCEAN_SSH_KEY_BODY > ~/.ssh/id_rsa

script:
- chef exec rake && chef exec kitchen test -c 5

after_script:
- chef exec kitchen destroy

env:
global:
# - KITCHEN_LOCAL_YAML=.kitchen.travis.yml
- chef exec kitchen test
5 changes: 1 addition & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ end

group :test do
gem 'rake'
gem 'cane'
gem 'countloc'
gem 'rubocop'
gem 'foodcritic'
gem 'rspec', '>= 3'
Expand All @@ -23,15 +21,14 @@ group :test do
gem 'coveralls'
gem 'fauxhai'
gem 'test-kitchen'
gem 'kitchen-digitalocean', '>= 0.8.0'
gem 'kitchen-localhost'
gem 'kitchen-vagrant'
gem 'winrm-transport'
gem 'kitchen-docker'
end

group :integration do
gem 'serverspec', '>= 2'
gem 'cucumber'
end

group :deploy do
Expand Down
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
Chef-DK Cookbook
================
[![Cookbook Version](https://img.shields.io/cookbook/v/chef-dk.svg)][cookbook]
[![Build Status](https://img.shields.io/travis/RoboticCheese/chef-dk-chef.svg)][travis]
[![OS X Build Status](https://img.shields.io/travis/RoboticCheese/chef-dk-chef.svg)][travis]
[![Windows Build Status](https://img.shields.io/appveyor/ci/RoboticCheese/chef-dk-chef.svg)][appveyor]
[![Linux Build Status](https://img.shields.io/circleci/project/RoboticCheese/chef-dk-chef.svg)][circle]
[![Code Climate](https://img.shields.io/codeclimate/github/RoboticCheese/chef-dk-chef.svg)][codeclimate]
[![Coverage Status](https://img.shields.io/coveralls/RoboticCheese/chef-dk-chef.svg)][coveralls]

[cookbook]: https://supermarket.chef.io/cookbooks/chef-dk
[travis]: https://travis-ci.org/RoboticCheese/chef-dk-chef
[appveyor]: https://ci.appveyor.com/project/RoboticCheese/chef-dk-chef
[circle]: https://circleci.com/gh/RoboticCheese/chef-dk-chef
[codeclimate]: https://codeclimate.com/github/RoboticCheese/chef-dk-chef
[coveralls]: https://coveralls.io/r/RoboticCheese/chef-dk-chef

Expand All @@ -15,13 +19,13 @@ A cookbook for installing the Chef Development Kit.
Requirements
============

As of version 0.3.5, Chef-DK packages are available for RHEL/CentOS/etc. 6,
Ubuntu 12.04/13.10, Debian 6/7, OS X 10.8/10.9/10.10, and Windows 7/8/2008/2012.
Each of these platforms is supported by this cookbook.
As of version 0.10.0, Chef-DK packages are available for RHEL/CentOS/etc. 7/6,
Ubuntu 14.04/13.04/12.04, Debian 7/6, OS X 10.11//10.10/10.9/10.8, and Windows
10/8.1/8/7/2012/2008. Each of these platforms is supported by this cookbook.

In some cases, platforms that aren't officially supported by Chef-DK may still
function. For example, this cookbook could be used to install the Ubuntu package
onto a 14.04 system. YMMV.
onto a 15.10 system. YMMV.

Prior to Chef 11.12.0, the core did not offer the `windows_package` resource
that is used for installation under Windows. _This cookbook will not run on
Expand Down Expand Up @@ -141,7 +145,7 @@ License & Authors
=================
- Author: Jonathan Hartman <j@p4nt5.com>

Copyright 2014-2015, Jonathan Hartman
Copyright 2014-2016, Jonathan Hartman

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
12 changes: 1 addition & 11 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
# Encoding: UTF-8

require 'rubygems'
require 'English'
require 'bundler/setup'
require 'rubocop/rake_task'
require 'cane/rake_task'
require 'rspec/core/rake_task'
require 'foodcritic'
require 'kitchen/rake_tasks'
require 'stove/rake_task'

Cane::RakeTask.new

RuboCop::RakeTask.new

desc 'Display LOC stats'
task :loc do
puts "\n## LOC Stats"
Kernel.system 'countloc -r .'
end

FoodCritic::Rake::LintTask.new do |f|
f.options = { fail_tags: %w(any) }
end
Expand All @@ -30,4 +20,4 @@ Kitchen::RakeTasks.new

Stove::RakeTask.new

task default: %w(cane rubocop loc foodcritic spec)
task default: %w(rubocop foodcritic spec)
17 changes: 17 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
branches:
only:
- master

cache:
- '%TEMP%\verifier\gems'

install:
- cinst chefdk
- SET PATH=C:\opscode\chefdk\bin;%PATH%

build_script:
- chef exec bundle install --without=development integration
- copy .kitchen.appveyor.yml .kitchen.local.yml

test_script:
- chef exec kitchen test
2 changes: 1 addition & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: chef-dk
# Attributes:: default
#
# Copyright 2014-2015 Jonathan Hartman
# Copyright 2014-2016, Jonathan Hartman
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
24 changes: 24 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
machine:
ruby:
version: 2.2.3
services:
- docker

dependencies:
pre:
- rvm install 2.0.0-p645
override:
- gem install -V berkshelf
- rvm-exec 2.0.0-p645 gem install -V berkshelf
- bundle install --without=development integration
- rvm-exec 2.0.0-p645 bundle install --without=development integration
cache_directories:
- /home/ubuntu/.rvm/gems

test:
pre:
- cp .kitchen.circle.yml .kitchen.local.yml
override:
- bundle exec rake
- rvm-exec 2.0.0-p645 bundle exec rake
- bundle exec kitchen test
2 changes: 1 addition & 1 deletion libraries/matchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: chef-dk
# Library:: matchers
#
# Copyright (C) 2014-2015 Jonathan Hartman
# Copyright 2014-2016, Jonathan Hartman
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_chef_dk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: chef-dk
# Library:: provider_chef_dk
#
# Copyright 2014-2015 Jonathan Hartman
# Copyright 2014-2016, Jonathan Hartman
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_chef_dk_debian.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: chef-dk
# Library:: provider_chef_dk_debian
#
# Copyright 2014-2015 Jonathan Hartman
# Copyright 2014-2016, Jonathan Hartman
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_chef_dk_fedora.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: chef-dk
# Library:: provider_chef_dk_fedora
#
# Copyright 2014-2015 Jonathan Hartman
# Copyright 2014-2016, Jonathan Hartman
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_chef_dk_mac_os_x.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: chef-dk
# Library:: provider_chef_dk_mac_os_x
#
# Copyright 2014-2015 Jonathan Hartman
# Copyright 2014-2016, Jonathan Hartman
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_chef_dk_rhel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: chef-dk
# Library:: provider_chef_dk_rhel
#
# Copyright 2014-2015 Jonathan Hartman
# Copyright 2014-2016, Jonathan Hartman
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_chef_dk_windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: chef-dk
# Library:: provider_chef_dk_windows
#
# Copyright 2014-2015 Jonathan Hartman
# Copyright 2014-2016, Jonathan Hartman
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion libraries/resource_chef_dk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: chef-dk
# Library:: resource_chef_dk
#
# Copyright 2014-2015 Jonathan Hartman
# Copyright 2014-2016, Jonathan Hartman
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: chef-dk
# Recipe:: default
#
# Copyright 2014-2015 Jonathan Hartman
# Copyright 2014-2016, Jonathan Hartman
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions spec/libraries/provider_chef_dk_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,12 @@
end

context 'Windows' do
let(:platform) { { platform: 'windows', version: '2012' } }
let(:platform) { { platform: 'windows', version: '2012R2' } }

it 'returns the correct params hash' do
expected = {
platform: 'windows',
platform_version: '6.2.9200',
platform_version: '6.3.9600',
machine_arch: 'x86_64',
version: nil,
prerelease: nil,
Expand Down
2 changes: 1 addition & 1 deletion spec/libraries/resource_chef_dk_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
},
{
platform: 'windows',
version: '2012',
version: '2012R2',
expected: Chef::Provider::ChefDk::Windows
}
].each do |p|
Expand Down