puppet-ci-testing 0.12.6 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/puppet_unittest_workflow +30 -5
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f99d1e3fe768586804350933c4dc5211259a532a
|
4
|
+
data.tar.gz: b9d60de3ec1c6bcd2621531d3ef927afe2aebc8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed1f2b9bd912e5c304606a8e6ff808b7c43fc313bf2c37e1fd8ed83288cc06a54ca15b6e2749abf88930d072d7515a7cb3c884f4f49a4c854456b41fc215854e
|
7
|
+
data.tar.gz: c6ef1ad60388beab4f430e4c0d17899dd5e3b33caa6667ef7e959d4803f0354878e7251f845ce5297037b80ce407b6fabbb0ec8b3c6fc9f38e09d122f34f777c
|
@@ -17,6 +17,30 @@ require 'check_file_syntax'
|
|
17
17
|
PUPPET_DIRS = ['files', 'lib', 'manifest', 'spec', 'templates', 'tests',
|
18
18
|
'.git_hooks']
|
19
19
|
|
20
|
+
# .fixtures.yml file is how the RSpec testing pulls in dependent
|
21
|
+
# puppet modules. We are able to generate it from the dependency
|
22
|
+
# information specified in the metadata.json file.
|
23
|
+
def create_fixtures_yml
|
24
|
+
metadata = JSON.parse(File.read('metadata.json'))
|
25
|
+
File.open('.fixtures.yml', 'w') do |fix|
|
26
|
+
fix.puts "fixtures:"
|
27
|
+
fix.puts " symlinks:"
|
28
|
+
fix.puts " #{(metadata['name'].split(/[\/\-]/))[-1]}: \"\#{source_dir}\""
|
29
|
+
if metadata.key? 'dependencies'
|
30
|
+
fix.puts " forge_modules:"
|
31
|
+
metadata['dependencies'].each do |dep|
|
32
|
+
if dep.key? 'version_requirement'
|
33
|
+
fix.puts " #{(dep['name'].split(/[\/\-]/))[-1]}:"
|
34
|
+
fix.puts " repo: \"#{dep['name']}\""
|
35
|
+
fix.puts " ref: \"#{dep['version_requirement'].gsub(/[=\<\>~\s]/, '')}\""
|
36
|
+
else
|
37
|
+
fix.puts " #{(dep['name'].split(/\/\-/))[1]}: \"#{dep['name']}\""
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
20
44
|
|
21
45
|
def process_syntax_checks(opts)
|
22
46
|
# collect all the current directories
|
@@ -30,7 +54,7 @@ def process_syntax_checks(opts)
|
|
30
54
|
========================================================================
|
31
55
|
========================================================================
|
32
56
|
|
33
|
-
|
57
|
+
Performing syntax checks
|
34
58
|
|
35
59
|
File types: #{opts.syntax_checks.map {|i| i.to_s}.join(', ')}
|
36
60
|
Directories: #{checked_dirs.join(', ')}
|
@@ -92,6 +116,7 @@ EOM
|
|
92
116
|
end
|
93
117
|
|
94
118
|
begin
|
119
|
+
# TODO: gather lint output and generate JUnit reports
|
95
120
|
Rake.application['lint'].invoke
|
96
121
|
rescue SystemExit => e
|
97
122
|
puts <<-EOM
|
@@ -132,18 +157,18 @@ EOM
|
|
132
157
|
Rake.application['spec_clean'].invoke
|
133
158
|
end
|
134
159
|
|
160
|
+
# Add a spec job to generate JUnit reports
|
135
161
|
RSpec::Core::RakeTask.new(:spec) do |task|
|
136
162
|
task.rspec_opts = %w[--format RspecJunitFormatter --out test-reports/rspec.xml]
|
137
163
|
task.pattern = 'spec/{classes,defines,unit,functions,hosts,integration}/**/*_spec.rb'
|
138
164
|
end
|
139
|
-
|
140
|
-
|
165
|
+
|
166
|
+
# we need a .fixtures.yml file to pull in dependent modules
|
167
|
+
create_fixtures_yml
|
141
168
|
Rake.application['spec'].invoke
|
142
169
|
end
|
143
170
|
|
144
171
|
|
145
|
-
|
146
|
-
|
147
172
|
if ENV['PUPPET_CI_CONF']
|
148
173
|
CONF_FILE = ENV['PUPPET_CI_CONF']
|
149
174
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-ci-testing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerard Hickey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: colorize
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.8.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.8.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: puppet-lint
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 3.5.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 3.5.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rake-version
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,7 +178,8 @@ dependencies:
|
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: 0.10.0
|
181
|
-
description:
|
181
|
+
description: Create an end to end CI workflow for integrating Puppet module testing
|
182
|
+
and publication.
|
182
183
|
email: hickey@kinetic-compute.com
|
183
184
|
executables:
|
184
185
|
- check_file_syntax
|
@@ -216,5 +217,5 @@ rubyforge_project:
|
|
216
217
|
rubygems_version: 2.4.8
|
217
218
|
signing_key:
|
218
219
|
specification_version: 4
|
219
|
-
summary:
|
220
|
+
summary: Utilities to perform Puppet testing in a CI workflow
|
220
221
|
test_files: []
|