Skip to content

Commit 539e027

Browse files
authored
v3.0.0 (#15)
## 3.0.0 - 01/07/2019 - Levon Becker * Updated to ChefDK 4.5.0 - Chef Client 15.4.45 - Ruby 2.6.5 * metadata.rb * Readme * Dockerfile * circle.yml * kitchen.yml * Version Locked to latest Amazon Linux to v1 (el6) for Kitchen, CloudFormation and Dockerfile * Refactored CloudFormation root keys to be alphabetical * Added YAML anchors to the kitchen config * Added environment variables fetch default examples in the kitchen config * Updated Berksfile.lock * Commented out test/* in chefignore * Removed support suse drafts * Merged bonusbits_library cookbook to this cookbook * Moved logic from default attributes to discovery and helpers libraries * Improved the shell library sensitive output control * Moved .circle.yml to .circleci/config.yml * Added Circleci Workflow * Split Rakefile tasks into separate files under tasks directory * Added Kubernetes deployment and service configurations * Updated Inspec attributes * Removed draft Windows support... not doing this any time soon, so drying up logic and sticking with Amazon Linux and Ubuntu * Added Indicator library and resource for creating indicator files * Added ec2_status attribute, recipe, library and resource for checking AWS EC2 Instance status * Added helpers library to DRY up cookbook code * Added Amazon Linux 2 as default in Kitchen, CloudFormation and Dockerfile * Added option to select between Amazon Linux 1 or 2 in Kitchen, CloudFormation and Dockerfile * Added logic to use lolcat gem if Amazon Linux 2 and package if v1 * Updated Java install / Inspec for Amazon Linux 1 & 2 * Removed Gemfile since not using bundler in CI anymore * Switch boolean inputs in kitchen config for inspec profile to no have quotes since looks like they've finally fixed that issue of strings coming through to the inspec control inputs
1 parent e7d451d commit 539e027

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+1790
-1551
lines changed

.circleci/config.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
version: 2.1
2+
timezone:
3+
America/Los_Angeles
4+
5+
jobs:
6+
style_tests:
7+
docker:
8+
- image: chef/chefdk:4.5.0
9+
working_directory: ~/circulate
10+
environment:
11+
GEM_HOME: /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems
12+
GEM_PATH: /opt/chefdk/embedded/lib/ruby/gems/2.6.0
13+
GEM_ROOT: /opt/chefdk/embedded/lib/ruby/gems/2.6.0
14+
CHEF_LICENSE: accept
15+
steps:
16+
- checkout
17+
- run:
18+
name: Create Reports Directory
19+
command: mkdir reports
20+
- run:
21+
name: Install Kitchen Docker
22+
command: chef gem install kitchen-docker -v 2.9.0 --no-user-install --no-document
23+
- run:
24+
name: Install Junit Formatter
25+
command: chef gem install rspec_junit_formatter -v 0.4.1 --no-user-install --no-document
26+
- run:
27+
name: Debug Outputs
28+
command: chef gem list | grep -i kitchen && env && ls /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems | grep kitchen
29+
- run:
30+
name: Run Rake Task
31+
command: /opt/chefdk/embedded/bin/rake style_tests --trace
32+
- store_test_results:
33+
path: reports/
34+
35+
integration_tests:
36+
machine:
37+
image: ubuntu-1604:201903-01
38+
#docker_layer_caching: true # Not available on free plan
39+
working_directory: ~/circulate
40+
environment:
41+
GEM_HOME: /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems
42+
GEM_PATH: /opt/chefdk/embedded/lib/ruby/gems/2.6.0
43+
GEM_ROOT: /opt/chefdk/embedded/lib/ruby/gems/2.6.0
44+
CHEF_LICENSE: accept
45+
steps:
46+
- checkout
47+
- run:
48+
name: Create Reports Directory
49+
command: mkdir reports
50+
#- run:
51+
# name: Install Ruby 2.6.5
52+
# command: |
53+
# rvm install 2.6.5
54+
# echo . $(rvm 2.6.5 do rvm env --path) >> $BASH_ENV
55+
- run:
56+
name: Install ChefDK
57+
command: wget https://packages.chef.io/files/stable/chefdk/4.5.0/ubuntu/16.04/chefdk_4.5.0-1_amd64.deb && sudo dpkg -i chefdk_4.5.0-1_amd64.deb && eval "$(chef shell-init bash)"
58+
- run:
59+
name: ChefDK Eval
60+
command: eval "$(chef shell-init bash)"
61+
- run:
62+
name: Install Kitchen Docker
63+
command: sudo CHEF_LICENSE="accept" chef gem install kitchen-docker -v 2.9.0 --no-user-install --no-document
64+
- run:
65+
name: Install Junit Formatter
66+
command: sudo chef gem install rspec_junit_formatter -v 0.4.1 --no-user-install --no-document
67+
- run:
68+
name: Debug Outputs
69+
command: |
70+
echo "DEBUG - Ruby Version ($(ruby -v), $(which ruby), $(docker -v))"
71+
echo "DEBUG - Docker Version ($(docker -v))"
72+
#echo "DEBUG - ChefDK Version ($(chef -v))"
73+
echo "DEBUG - /opt ($(ls -alh /opt))"
74+
chef gem list | grep -i kitchen
75+
env
76+
ls /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems | grep kitchen
77+
- run:
78+
name: Run Rake Task
79+
command: /opt/chefdk/embedded/bin/rake integration:docker --trace
80+
- store_test_results:
81+
path: reports/
82+
83+
build:
84+
docker:
85+
- image: chef/chefdk:4.5.0
86+
working_directory: ~/circulate
87+
steps:
88+
- checkout
89+
- run:
90+
name: Message Building
91+
command: echo 'INFO - BUILD'
92+
93+
deploy:
94+
docker:
95+
- image: chef/chefdk:4.5.0
96+
working_directory: ~/circulate
97+
steps:
98+
- checkout
99+
- run:
100+
name: Message Deploying
101+
command: echo 'INFO - DEPLOY'
102+
103+
workflows:
104+
version: 2
105+
# Put in one because not paying for parallel jobs
106+
style_and_integration:
107+
jobs:
108+
- style_tests
109+
- integration_tests:
110+
requires:
111+
- style_tests
112+
- build:
113+
requires:
114+
- integration_tests
115+
filters:
116+
branches:
117+
only: master
118+
- deploy:
119+
requires:
120+
- build
121+
filters:
122+
branches:
123+
only: master
124+
125+
notify:
126+
webhooks:
127+
- url: https://webhooks.gitter.im/e/076791447ffdd7cf8037

.gitignore

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,36 @@
1+
# Basics
2+
*#
3+
*.un~
4+
*~
5+
.#*
6+
.*.sw[a-z]
17
/.bundle/
28
/.yardoc
39
/_yardoc/
410
/coverage/
511
/doc/
612
/pkg/
713
/spec/reports/
8-
/tmp/
9-
Policyfile.lock*
10-
*~
11-
*#
12-
.#*
1314
\#*#
14-
.*.sw[a-z]
15-
*.un~
1615
pkg/
16+
tmp/**
1717

18-
# Vagrant
19-
.vagrant
18+
# Chef
19+
Policyfile.lock*
20+
21+
# Docker
22+
Dockerfile-kitchen*
2023

2124
# Berkshelf
2225
/cookbooks
23-
#Berksfile.lock
24-
#Gemfile.lock
26+
Berksfile.lock
2527

2628
# Bundler
2729
bin/*
2830
.bundle/*
2931

30-
# Test Kitchen
31-
.kitchen/
32-
.kitchen.local.yml
33-
3432
# JetBrains
35-
*.iml
36-
.idea
37-
/out/
38-
.idea_modules/
39-
atlassian-ide-plugin.xml
40-
com_crashlytics_export_strings.xml
41-
crashlytics.properties
42-
crashlytics-build.properties
33+
.idea/**
4334

4435
# Linux
4536
.directory
@@ -49,6 +40,13 @@ crashlytics-build.properties
4940
.DS_Store
5041
.localized
5142

43+
# Ruby
44+
Gemfile.lock
45+
46+
# Test Kitchen
47+
.kitchen/
48+
.kitchen.local.yml
49+
5250
# Windows
5351
Thumbs.db
5452
ehthumbs.db
@@ -60,5 +58,7 @@ $RECYCLE.BIN/
6058
*.msp
6159
*.lnk
6260

63-
# Docker
64-
Dockerfile-kitchen*
61+
# Vagrant
62+
.vagrant
63+
VagrantConfig.rb
64+
vagrant-rsync-auto.log

0 commit comments

Comments
 (0)