beaker-puppet 1.27.0 → 1.28.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68502ef5f5e7277b97ce2192ef1d51f571d084e705e98d69f1f4a53e303fcac0
4
- data.tar.gz: 3c3c471c33bf0481e6a3d8e44fdaabae4f5efec04377f56a66135d905995c043
3
+ metadata.gz: cf21a6b7afe882c94b17c6ff55239532021394e4c46daa0fb29918b9b3e7eece
4
+ data.tar.gz: 5cf422b3b4d6af2d003a9fa33ab27dbb04f5064c485292825bd856dfbfb634c2
5
5
  SHA512:
6
- metadata.gz: 036c6489dd3157d13fb07123dfc27dba5bf7ef1e6ac488f8230942072057a01fd9f32a36922747fc8e656562ffc88f967e0c54f7b4ca15dab9ba4ae6c2ce88dc
7
- data.tar.gz: bca6b6878ed42eb9126af029381df3144c5c7e540ffafc07031c14d478e34212256ccf56dd4b9972852ef0f894616b7c1ed95e8b2c7a3f31587a223abbad03e5
6
+ metadata.gz: 9de708d504b6a7a337d796320eebbd79854cde88ab97154d6e8e5efbb8a107b0ad8be0a4fcc3590a8435c33653f29b6d0be4afd2876e1062ca2fab30a289619c
7
+ data.tar.gz: b3954ddbeab7c58c627276564b2001859707e3f266e72ddbce104e33e2390d7aa9b000e9f687b29e415b9725c814d982604c05e0b0f34fa2fe6af2fdc73d68b9
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.28.0](https://github.com/voxpupuli/beaker-puppet/tree/1.28.0) (2022-09-08)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/beaker-puppet/compare/1.27.0...1.28.0)
8
+
9
+ **Implemented enhancements:**
10
+
11
+ - \(PA-4552\) Create ci:test:setup step for iterative workflow [\#194](https://github.com/voxpupuli/beaker-puppet/pull/194) ([joshcooper](https://github.com/joshcooper))
12
+
5
13
  ## [1.27.0](https://github.com/voxpupuli/beaker-puppet/tree/1.27.0) (2022-08-31)
6
14
 
7
15
  [Full Changelog](https://github.com/voxpupuli/beaker-puppet/compare/1.26.3...1.27.0)
@@ -14,6 +22,10 @@ All notable changes to this project will be documented in this file.
14
22
 
15
23
  - \(PA-4566\) Retry beaker exec if presuite completes [\#195](https://github.com/voxpupuli/beaker-puppet/pull/195) ([joshcooper](https://github.com/joshcooper))
16
24
 
25
+ **Merged pull requests:**
26
+
27
+ - Release 1.27.0 [\#199](https://github.com/voxpupuli/beaker-puppet/pull/199) ([mhashizume](https://github.com/mhashizume))
28
+
17
29
  ## [1.26.3](https://github.com/voxpupuli/beaker-puppet/tree/1.26.3) (2022-08-09)
18
30
 
19
31
  [Full Changelog](https://github.com/voxpupuli/beaker-puppet/compare/1.26.2...1.26.3)
@@ -1,3 +1,3 @@
1
1
  module BeakerPuppet
2
- VERSION = '1.27.0'
2
+ VERSION = '1.28.0'
3
3
  end
data/tasks/ci.rake CHANGED
@@ -25,6 +25,7 @@ Usage: bundle exec rake <target> [arguments]
25
25
 
26
26
  where <target> is one of:
27
27
 
28
+ ci:test:setup
28
29
  ci:test:git
29
30
  ci:test:aio
30
31
  ci:test:gem
@@ -126,11 +127,22 @@ namespace :ci do
126
127
  end
127
128
 
128
129
  task :check_env do
129
- if ENV['SHA'].nil?
130
+ sha = ENV['SHA']
131
+ case sha
132
+ when /^\d+\.\d+\.\d+$/
133
+ # tags are ok
134
+ when /^[0-9a-f]{40}$/
135
+ # full SHAs are ok
136
+ when nil
130
137
  puts "Error: A SHA must be specified"
131
138
  puts "\n"
132
139
  puts USAGE
133
140
  exit 1
141
+ else
142
+ puts "Error: Expected SHA to be a tag or 40 digit SHA, not '#{sha}'"
143
+ puts "\n"
144
+ puts USAGE
145
+ exit 1
134
146
  end
135
147
 
136
148
  if ENV['TESTS'].nil?
@@ -205,6 +217,35 @@ EOS
205
217
  end
206
218
  end
207
219
 
220
+ desc <<-EOS
221
+ Setup acceptance tests using puppet-agent (AIO) packages.
222
+
223
+ $ SHA=<tag or full sha> HOSTS=<hosts> bundle exec rake ci:test:setup
224
+
225
+ SHA should be the tag or full SHA for the puppet-agent package.
226
+
227
+ HOSTS can be a beaker-hostgenerator string or existing file.
228
+ EOS
229
+ task :setup => ['ci:check_env'] do |t, args|
230
+ unless ENV['HOSTS']
231
+ case File.basename(Dir.pwd.sub(/\/acceptance$/, ''))
232
+ when 'pxp-agent', 'puppet'
233
+ ENV['HOSTS'] ||= 'redhat7-64m-redhat7-64a'
234
+ else
235
+ ENV['HOSTS'] ||= 'redhat7-64a'
236
+ end
237
+ end
238
+
239
+ Rake::Task[:'ci:gen_hosts'].invoke('abs')
240
+ beaker_setup(:aio)
241
+ puts "\nSetup completed on:"
242
+ YAML.load_file('.beaker/subcommand_options.yaml').fetch('HOSTS', {}).each_pair do |hostname, data|
243
+ roles = data.fetch('roles', []).join(', ')
244
+ puts "- #{hostname} (#{roles})"
245
+ end
246
+ puts "\nRun 'bundle exec beaker exec <path>' where <path> is a directory or comma-separated list of tests."
247
+ end
248
+
208
249
  desc <<-EOS
209
250
  Run the acceptance tests against puppet gem on various platforms, performing a
210
251
  basic smoke test.
@@ -265,6 +306,13 @@ def beaker(command, *argv)
265
306
  sh('beaker', command.to_s, *argv)
266
307
  end
267
308
 
309
+ def beaker_setup(type)
310
+ beaker(:init, '--hosts', ENV['HOSTS'], '--preserve-hosts', 'always', '--options-file', "config/#{String(type)}/options.rb")
311
+ beaker(:provision)
312
+ beaker(:exec, 'pre-suite', '--preserve-state', '--pre-suite', pre_suites(type))
313
+ beaker(:exec, 'pre-suite', '--preserve-state')
314
+ end
315
+
268
316
  def beaker_suite(type)
269
317
  beaker(:init, '--hosts', ENV['HOSTS'], '--options-file', "config/#{String(type)}/options.rb")
270
318
  beaker(:provision)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.27.0
4
+ version: 1.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-31 00:00:00.000000000 Z
11
+ date: 2022-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec