poise-boiler 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/poise_boiler/helpers/rake/travis.rb +9 -1
- data/lib/poise_boiler/kitchen.rb +12 -1
- data/lib/poise_boiler/version.rb +1 -1
- data/poise-boiler.gemspec +2 -2
- data/spec/helpers/travis_spec.rb +5 -13
- data/spec/kitchen_spec.rb +7 -7
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2238940c4ca23c51ac808bc84ccec29a784aa3ff
|
4
|
+
data.tar.gz: a05d943a5e649100ebcfa698eadc7be35006b2fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2963fde329b7ec4a4760382bc7d2369e08e2ef18bc316b25a1dddc4e904759409ad95bac325dd8888f20b8207786418887245e1e407c73157a2f7c8d07fe833a
|
7
|
+
data.tar.gz: 46f7ef5f48c47acd57e90eada8747326259b6964c656dc357ad31173414effeb30ce41f66f45bc4723d3ed5191cd2ec774afa05f6690399288692874fab84100
|
data/CHANGELOG.md
CHANGED
@@ -60,6 +60,7 @@ module PoiseBoiler
|
|
60
60
|
|
61
61
|
desc 'Run CI tests'
|
62
62
|
task 'travis' do
|
63
|
+
ENV['POISE_MASTER_BUILD'] = 'true' if master_build?
|
63
64
|
run_subtask('spec')
|
64
65
|
run_subtask('chef:foodcritic')
|
65
66
|
run_subtask('travis:integration') if integration_tests?
|
@@ -71,11 +72,18 @@ module PoiseBoiler
|
|
71
72
|
|
72
73
|
private
|
73
74
|
|
75
|
+
# Is this a master build?
|
76
|
+
#
|
77
|
+
# @return [Boolean]
|
78
|
+
def master_build?
|
79
|
+
ENV['BUNDLE_GEMFILE'].to_s.include?('master.gemfile')
|
80
|
+
end
|
81
|
+
|
74
82
|
# Should we run integration tests?
|
75
83
|
#
|
76
84
|
# @return [Boolean]
|
77
85
|
def integration_tests?
|
78
|
-
ENV['TRAVIS_SECURE_ENV_VARS']
|
86
|
+
ENV['TRAVIS_SECURE_ENV_VARS'] == 'true'
|
79
87
|
end
|
80
88
|
|
81
89
|
# Should we set things up for Rackspace integration tests? The default
|
data/lib/poise_boiler/kitchen.rb
CHANGED
@@ -49,6 +49,14 @@ module PoiseBoiler
|
|
49
49
|
require 'chef/version'
|
50
50
|
Chef::VERSION
|
51
51
|
end
|
52
|
+
install_arguments = if ENV['POISE_MASTER_BUILD']
|
53
|
+
# Use today's date as an ignored param to force the layer to rebuild.
|
54
|
+
" -n -- #{Date.today}"
|
55
|
+
elsif chef_version
|
56
|
+
" -v #{chef_version}"
|
57
|
+
else
|
58
|
+
''
|
59
|
+
end
|
52
60
|
{
|
53
61
|
'chef_versions' => %w{12},
|
54
62
|
'driver' => {
|
@@ -57,13 +65,16 @@ module PoiseBoiler
|
|
57
65
|
'provision_command' => [
|
58
66
|
# Run some installs at provision so they are cached in the image.
|
59
67
|
# Install Chef (with the correct verison).
|
60
|
-
"curl -L https://chef.io/chef/install.sh | bash -s
|
68
|
+
"curl -L https://chef.io/chef/install.sh | bash -s --#{install_arguments}",
|
61
69
|
# Install some kitchen-related gems. Normally installed during the verify step but that is idempotent.
|
62
70
|
"env GEM_HOME=/tmp/verifier/gems GEM_PATH=/tmp/verifier/gems GEM_CACHE=/tmp/verifier/gems/cache /opt/chef/embedded/bin/gem install thor busser busser-serverspec serverspec bundler",
|
63
71
|
# Fix directory permissions.
|
64
72
|
"chown -R kitchen /tmp/verifier",
|
65
73
|
],
|
66
74
|
},
|
75
|
+
'transport' => {
|
76
|
+
'name' => 'sftp',
|
77
|
+
},
|
67
78
|
'platforms' => expand_kitchen_platforms(platforms).map {|p| {'name' => p, 'run_list' => platform_run_list(p)} },
|
68
79
|
}.to_yaml.gsub(/---[ \n]/, '')
|
69
80
|
end
|
data/lib/poise_boiler/version.rb
CHANGED
data/poise-boiler.gemspec
CHANGED
@@ -53,11 +53,11 @@ Gem::Specification.new do |spec|
|
|
53
53
|
spec.add_dependency 'foodcritic', '~> 4.0'
|
54
54
|
|
55
55
|
# Integration gems
|
56
|
-
spec.add_dependency 'test-kitchen', '~> 1.
|
56
|
+
spec.add_dependency 'test-kitchen', '~> 1.4'
|
57
57
|
spec.add_dependency 'kitchen-vagrant'
|
58
58
|
spec.add_dependency 'vagrant-wrapper'
|
59
59
|
spec.add_dependency 'kitchen-docker'
|
60
|
-
spec.add_dependency 'kitchen-sync'
|
60
|
+
spec.add_dependency 'kitchen-sync', '~> 1.1'
|
61
61
|
spec.add_dependency 'berkshelf', '~> 3.2'
|
62
62
|
|
63
63
|
# Travis gems
|
data/spec/helpers/travis_spec.rb
CHANGED
@@ -41,7 +41,7 @@ EOH
|
|
41
41
|
file 'README.md'
|
42
42
|
|
43
43
|
context 'no secure vars' do
|
44
|
-
environment TRAVIS_SECURE_ENV_VARS: ''
|
44
|
+
environment TRAVIS_SECURE_ENV_VARS: 'false'
|
45
45
|
|
46
46
|
its(:stdout) { is_expected.to include 'Running task spec' }
|
47
47
|
its(:stdout) { is_expected.to include 'Running task chef:foodcritic' }
|
@@ -50,7 +50,7 @@ EOH
|
|
50
50
|
end # /context no secure vars
|
51
51
|
|
52
52
|
context 'secure vars' do
|
53
|
-
environment TRAVIS_SECURE_ENV_VARS: '
|
53
|
+
environment TRAVIS_SECURE_ENV_VARS: 'true', KITCHEN_DOCKER_PASS: 'secret'
|
54
54
|
file 'test/docker/docker.pem', <<-EOH
|
55
55
|
-----BEGIN RSA PRIVATE KEY-----
|
56
56
|
Proc-Type: 4,ENCRYPTED
|
@@ -110,29 +110,21 @@ EOH
|
|
110
110
|
|
111
111
|
its(:stdout) { is_expected.to include 'Running task spec' }
|
112
112
|
its(:stdout) { is_expected.to include 'Running task chef:foodcritic' }
|
113
|
-
|
114
|
-
its(:stdout) { is_expected.to_not include 'Running task travis:integration' }
|
115
|
-
else
|
116
|
-
its(:stdout) { is_expected.to include 'Running task travis:integration' }
|
117
|
-
end
|
113
|
+
its(:stdout) { is_expected.to include 'Running task travis:integration' }
|
118
114
|
its(:exitstatus) { is_expected.to eq 0 }
|
119
115
|
end # /context secure vars
|
120
116
|
|
121
117
|
context 'secure vars and Rackspace' do
|
122
118
|
file '.kitchen.travis.yml', 'name: rackspace'
|
123
119
|
file '.ssh/stub'
|
124
|
-
environment TRAVIS_SECURE_ENV_VARS: '
|
120
|
+
environment TRAVIS_SECURE_ENV_VARS: 'true'
|
125
121
|
before do
|
126
122
|
_environment['HOME'] = temp_path
|
127
123
|
end
|
128
124
|
|
129
125
|
its(:stdout) { is_expected.to include 'Running task spec' }
|
130
126
|
its(:stdout) { is_expected.to include 'Running task chef:foodcritic' }
|
131
|
-
|
132
|
-
its(:stdout) { is_expected.to_not include 'Running task travis:integration' }
|
133
|
-
else
|
134
|
-
its(:stdout) { is_expected.to include 'Running task travis:integration' }
|
135
|
-
end
|
127
|
+
its(:stdout) { is_expected.to include 'Running task travis:integration' }
|
136
128
|
its(:exitstatus) { is_expected.to eq 0 }
|
137
129
|
end
|
138
130
|
end
|
data/spec/kitchen_spec.rb
CHANGED
@@ -31,7 +31,7 @@ EOH
|
|
31
31
|
context 'with defaults' do
|
32
32
|
context 'kitchen list' do
|
33
33
|
command 'kitchen list'
|
34
|
-
its(:stdout) { is_expected.to match(/default-ubuntu-1404\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+
|
34
|
+
its(:stdout) { is_expected.to match(/default-ubuntu-1404\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+Sftp\s+)?<Not Created>/) }
|
35
35
|
end # /context kitchen list
|
36
36
|
|
37
37
|
context 'kitchen diagnose' do
|
@@ -52,10 +52,10 @@ suites:
|
|
52
52
|
- name: default
|
53
53
|
EOH
|
54
54
|
command 'kitchen list'
|
55
|
-
its(:stdout) { is_expected.to match(/default-ubuntu-1404\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+
|
56
|
-
its(:stdout) { is_expected.to match(/default-ubuntu-1204\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+
|
57
|
-
its(:stdout) { is_expected.to match(/default-centos-6\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+
|
58
|
-
its(:stdout) { is_expected.to match(/default-centos-7\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+
|
55
|
+
its(:stdout) { is_expected.to match(/default-ubuntu-1404\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+Sftp\s+)?<Not Created>/) }
|
56
|
+
its(:stdout) { is_expected.to match(/default-ubuntu-1204\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+Sftp\s+)?<Not Created>/) }
|
57
|
+
its(:stdout) { is_expected.to match(/default-centos-6\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+Sftp\s+)?<Not Created>/) }
|
58
|
+
its(:stdout) { is_expected.to match(/default-centos-7\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+Sftp\s+)?<Not Created>/) }
|
59
59
|
end # /context with a platform alias
|
60
60
|
|
61
61
|
context 'with $CHEF_VERSION set' do
|
@@ -86,7 +86,7 @@ suites:
|
|
86
86
|
- name: default
|
87
87
|
EOH
|
88
88
|
command 'kitchen list'
|
89
|
-
its(:stdout) { is_expected.to match(/default-gentoo\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+
|
90
|
-
its(:stdout) { is_expected.to match(/default-arch\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+
|
89
|
+
its(:stdout) { is_expected.to match(/default-gentoo\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+Sftp\s+)?<Not Created>/) }
|
90
|
+
its(:stdout) { is_expected.to match(/default-arch\s+(Vagrant|Dummy)\s+ChefSolo\s+(Busser\s+Sftp\s+)?<Not Created>/) }
|
91
91
|
end # /context with a platform override
|
92
92
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poise-boiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Kantrowitz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -218,14 +218,14 @@ dependencies:
|
|
218
218
|
requirements:
|
219
219
|
- - "~>"
|
220
220
|
- !ruby/object:Gem::Version
|
221
|
-
version: '1.
|
221
|
+
version: '1.4'
|
222
222
|
type: :runtime
|
223
223
|
prerelease: false
|
224
224
|
version_requirements: !ruby/object:Gem::Requirement
|
225
225
|
requirements:
|
226
226
|
- - "~>"
|
227
227
|
- !ruby/object:Gem::Version
|
228
|
-
version: '1.
|
228
|
+
version: '1.4'
|
229
229
|
- !ruby/object:Gem::Dependency
|
230
230
|
name: kitchen-vagrant
|
231
231
|
requirement: !ruby/object:Gem::Requirement
|
@@ -272,16 +272,16 @@ dependencies:
|
|
272
272
|
name: kitchen-sync
|
273
273
|
requirement: !ruby/object:Gem::Requirement
|
274
274
|
requirements:
|
275
|
-
- - "
|
275
|
+
- - "~>"
|
276
276
|
- !ruby/object:Gem::Version
|
277
|
-
version: '
|
277
|
+
version: '1.1'
|
278
278
|
type: :runtime
|
279
279
|
prerelease: false
|
280
280
|
version_requirements: !ruby/object:Gem::Requirement
|
281
281
|
requirements:
|
282
|
-
- - "
|
282
|
+
- - "~>"
|
283
283
|
- !ruby/object:Gem::Version
|
284
|
-
version: '
|
284
|
+
version: '1.1'
|
285
285
|
- !ruby/object:Gem::Dependency
|
286
286
|
name: berkshelf
|
287
287
|
requirement: !ruby/object:Gem::Requirement
|
@@ -402,7 +402,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
402
402
|
version: '0'
|
403
403
|
requirements: []
|
404
404
|
rubyforge_project:
|
405
|
-
rubygems_version: 2.4.
|
405
|
+
rubygems_version: 2.4.8
|
406
406
|
signing_key:
|
407
407
|
specification_version: 4
|
408
408
|
summary: Boilerplate-reduction helpers for Poise/Halite-style gemss.
|