-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update cookbook to sous-chefs standards
- Loading branch information
Showing
15 changed files
with
161 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
kitchen: sous-chefs/kitchen@1.0.0 | ||
|
||
workflows: | ||
kitchen: | ||
jobs: | ||
- kitchen/lint: | ||
name: lint | ||
- kitchen/dokken: | ||
name: default | ||
suite: default | ||
requires: [ lint ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
driver: | ||
name: dokken | ||
privileged: true # because Docker and SystemD/Upstart | ||
chef_version: <%= ENV['CHEF_VERSION'] || "current" %> | ||
|
||
transport: | ||
name: dokken | ||
|
||
provisioner: | ||
name: dokken | ||
deprecations_as_errors: true | ||
|
||
verifier: | ||
name: inspec | ||
|
||
platforms: | ||
- name: debian-8 | ||
driver: | ||
image: dokken/debian-8 | ||
pid_one_command: /sbin/init | ||
intermediate_instructions: | ||
- RUN /usr/bin/apt-get update | ||
- RUN /usr/bin/apt-get install sudo -y | ||
|
||
- name: debian-9 | ||
driver: | ||
image: dokken/debian-9 | ||
pid_one_command: /bin/systemd | ||
intermediate_instructions: | ||
- RUN /usr/bin/apt-get update | ||
- RUN /usr/bin/apt-get install sudo -y | ||
|
||
- name: centos-6 | ||
driver: | ||
image: dokken/centos-6 | ||
pid_one_command: /sbin/init | ||
intermediate_instructions: | ||
- RUN yum -y install sudo | ||
|
||
- name: centos-7 | ||
driver: | ||
image: dokken/centos-7 | ||
pid_one_command: /usr/lib/systemd/systemd | ||
intermediate_instructions: | ||
- RUN yum -y install sudo | ||
|
||
- name: fedora-latest | ||
driver: | ||
image: dokken/fedora-latest | ||
pid_one_command: /usr/lib/systemd/systemd | ||
intermediate_instructions: | ||
- RUN dnf -y install sudo | ||
|
||
- name: ubuntu-16.04 | ||
driver: | ||
image: dokken/ubuntu-16.04 | ||
pid_one_command: /bin/systemd | ||
intermediate_instructions: | ||
- RUN /usr/bin/apt-get update | ||
- RUN /usr/bin/apt-get install sudo -y | ||
|
||
- name: ubuntu-18.04 | ||
driver: | ||
image: dokken/ubuntu-18.04 | ||
pid_one_command: /bin/systemd | ||
intermediate_instructions: | ||
- RUN /usr/bin/apt-get update | ||
- RUN /usr/bin/apt-get install sudo -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
AllCops: | ||
Exclude: | ||
- 'Dangerfile' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
source 'https://supermarket.chef.io' | ||
|
||
metadata | ||
|
||
group :integration do | ||
cookbook 'test', path: 'test/fixtures/cookbooks/test' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Reference: http://danger.systems/reference.html | ||
|
||
# A pull request summary is required. Add a description of the pull request purpose. | ||
# Add labels to the pull request in github to identify the type of change. https://help.github.com/articles/applying-labels-to-issues-and-pull-requests/ | ||
# Changelog must be updated for each pull request. | ||
# Warnings will be issued for: | ||
# Pull request with more than 400 lines of code changed | ||
# Pull reqest that change more than 5 lines without test changes | ||
|
||
def code_changes? | ||
code = %w(libraries attributes recipes resources) | ||
code.each do |location| | ||
return true unless git.modified_files.grep(/#{location}/).empty? | ||
end | ||
false | ||
end | ||
|
||
def test_changes? | ||
tests = %w(spec test .kitchen.yml .kitchen.dokken.yml) | ||
tests.each do |location| | ||
return true unless git.modified_files.grep(/#{location}/).empty? | ||
end | ||
false | ||
end | ||
|
||
fail 'Please provide a summary of your Pull Request.' if github.pr_body.length < 10 | ||
|
||
fail 'Please add labels to this Pull Request' if github.pr_labels.empty? | ||
|
||
warn 'This is a big Pull Request.' if git.lines_of_code > 400 | ||
|
||
# Require a CHANGELOG entry for non-test changes. | ||
if !git.modified_files.include?('CHANGELOG.md') && code_changes? | ||
fail 'Please include a [CHANGELOG](https://github.com/sous-chefs/line-cookbook/blob/master/CHANGELOG.md) entry.' | ||
end | ||
|
||
# A sanity check for tests. | ||
if git.lines_of_code > 5 && code_changes? && !test_changes? | ||
warn 'This Pull Request is probably missing tests.' | ||
end |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name 'test' | ||
version '0.99.0' | ||
|
||
depends 'ruby_rbenv' |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
control 'Aptly should be installed' do | ||
title 'Should install the Aply binary' | ||
|
||
desc 'Aplty binary' | ||
describe command('aptly') do | ||
it { should exist } | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: rbenv | ||
title: rbenv profile | ||
maintainer: Sous Chefs | ||
copyright: Webb Agile Solutions Ltd. | ||
license: Apache-2.0 | ||
summary: Verifies gems install correctly to the correct Ruby versions | ||
version: 1.0.0 | ||
supports: | ||
- os-family: linux |