simp-beaker-helpers 1.10.7 → 1.10.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32a8dc49acbd2983aba94a4ba0807a14c38067db0919405ea998fb2a60fe68c0
4
- data.tar.gz: 8c85f102e7dc4dce934303d76885b4cfed21c42cf47cdbbc843497b377477d23
3
+ metadata.gz: 203f131bf48ef1e75d99c5e856f454abb1eeff54934caae0e776ba3c0e6ad5d5
4
+ data.tar.gz: 9494a7808631eeb917fa7c898621aa6c4e1e761c719cf9738dd340107c03529c
5
5
  SHA512:
6
- metadata.gz: 92206a3fd881f98bcd574189c3090459048bfb0c813b08381f7ceeb65d0def201d963616eb08df4ebfa080309bdffd65e8c5a9d010a9f0764ccc3ea8a50f6f14
7
- data.tar.gz: 615c5b9a61816772adc6cf6503be7db15ae71ae629fd7f7e4ca63db3e7b10948b983da44260faa8604d7ee8a980cfa3abc95f4d9d6d799f1dc5e89a1d344e4a1
6
+ metadata.gz: 78fd7c23dec2661905180b85f5bcb3342be28216285519108ee12a43b0812424b57969252dcc8837b11f2825e33dfecce9fb89a2b6c46de3d910be60c11f8584
7
+ data.tar.gz: c7dd37b296aeaafc44004cb6621b22a36c92e4b601ea619a926a203fb302f3000d45188d9fa106a4cf726bb144873616d309129b3b103a9c30d95fb9d5c7cb0a
data/.gitlab-ci.yml ADDED
@@ -0,0 +1,124 @@
1
+ ---
2
+ #=======================================================================
3
+ # Global stuff
4
+ stages:
5
+ - sanity
6
+ - unit
7
+ - lint
8
+ - acceptance
9
+
10
+ # Default versions are set only as fallbacks for jobs that don't care which
11
+ # version they use. Versions should be explicitly set in any job with specific
12
+ # version requirements, even if they match these defaults.
13
+ image: 'ruby:2.1'
14
+
15
+ cache:
16
+ key: '${CI_COMMIT_REF_SLUG}'
17
+ paths:
18
+ - 'vendor/ruby'
19
+
20
+ before_script:
21
+ - 'ruby -v'
22
+ - 'apt update && apt install -y rpm'
23
+ - 'bundle -v || gem install bundler'
24
+ - 'bundle config --local path vendor'
25
+ - 'rm -f Gemfile.lock'
26
+ - 'bundle install -j $(nproc) --no-binstubs'
27
+
28
+ #=======================================================================
29
+ # Anchors
30
+
31
+ .acceptance_base: &acceptance_base
32
+ stage: 'acceptance'
33
+ tags: ['beaker']
34
+ cache:
35
+ policy: 'pull'
36
+ dependencies: []
37
+ artifacts:
38
+ when: 'always'
39
+ paths:
40
+ - 'Gemfile.lock'
41
+ retry: 1
42
+ script:
43
+ - 'bundle exec rake beaker:suites'
44
+
45
+ # ----------------------------------------------------------------------
46
+ # Version Matrix
47
+ #
48
+ # It would be too expensive, both in time and compute resources, to test
49
+ # against every last version combination, so we restrict it to this subset.
50
+ # Version sets are selected based on current support policies for major platform
51
+ # software, such as Puppet and Ruby. Namely, we use the version combinations
52
+ # bundled in Puppet Enterprise.
53
+ #
54
+ # For more information see:
55
+ # * https://puppet.com/docs/pe/latest/overview/component_versions_in_recent_pe_releases.html
56
+ # * https://puppet.com/misc/puppet-enterprise-lifecycle
57
+ # * https://puppet.com/docs/pe/latest/overview/getting_support_for_pe.html#standard-releases-and-long-term-support-releases
58
+ #
59
+ # ----------------------------------------------
60
+ # | Release | Puppet | Ruby | End-of-Life Date |
61
+ # ----------|--------|------|------------------|
62
+ # PE 2016.4 4.7 2.1 2018-10
63
+ # PE 2016.5 4.8 2.1 2017-05
64
+ # SIMP 6.0 4.8 2.1 TBD
65
+ # PE 2017.1 4.9 2.1 2017-10
66
+ # PE 2017.2 4.10 2.1 2018-02
67
+ # PE 2017.3 5.3 2.4 2018-08
68
+ # PE 2018.1 5.5 2.4 2020-05
69
+ #
70
+
71
+ .simp_6_1: &simp_6_1
72
+ variables:
73
+ PUPPET_VERSION: '~> 4.10.4'
74
+
75
+ #=======================================================================
76
+ # Basic Sanity Checks
77
+ #
78
+ # Execute simple sanity checks on the environment before proceeding to more
79
+ # resource-intensive jobs. Besides running checks, this condenses the initial
80
+ # cache generation into a single job for the later stages. The first stage,
81
+ # in particular, would otherwise suffer a heavy cache-miss penalty as its
82
+ # jobs kick off in parallel.
83
+ sanity_checks:
84
+ stage: 'sanity'
85
+ tags: ['docker']
86
+ script:
87
+ - 'bundle exec rake check:dot_underscore'
88
+ - 'bundle exec rake check:test_file'
89
+
90
+ tag_check:
91
+ stage: 'sanity'
92
+ only: ['tags']
93
+ tags: ['docker']
94
+ script: '[ "$CI_COMMIT_TAG" = "$MODULE_VERSION" ] || echo "ERROR: Tag does not match metadata version" && exit 1'
95
+
96
+ #=======================================================================
97
+ # Unit Tests
98
+ #
99
+ unit:
100
+ stage: 'unit'
101
+ image: 'ruby:2.1.9'
102
+ tags: ['docker']
103
+ script:
104
+ - 'bundle exec rake spec'
105
+ cache:
106
+ policy: 'pull'
107
+ dependencies: []
108
+ artifacts:
109
+ when: 'always'
110
+ paths:
111
+ - 'Gemfile.lock'
112
+
113
+ # ==============================================================================
114
+ # acceptance tests
115
+ #
116
+ el-simp_6_1-default:
117
+ <<: *acceptance_base
118
+ <<: *simp_6_1
119
+
120
+ el-simp_6_1-default-fips:
121
+ <<: *acceptance_base
122
+ <<: *simp_6_1
123
+ variables:
124
+ BEAKER_fips: 'yes'
data/.travis.yml CHANGED
@@ -9,13 +9,11 @@ notifications:
9
9
  email: false
10
10
  rvm:
11
11
  - 2.1.9
12
- - 2.3.3
12
+ - 2.4.2
13
13
  env:
14
14
  - SIMP_SKIP_NON_SIMPOS_TESTS=1
15
15
  script:
16
16
  - bundle exec rake spec
17
- matrix:
18
- fast_finish: true
19
17
  before_deploy:
20
18
  - bundle exec rake clobber
21
19
  - "export GEM_VERSION=`ruby -r ./lib/simp/beaker_helpers/version.rb -e 'puts Simp::BeakerHelpers::VERSION'`"
@@ -28,12 +26,12 @@ deploy:
28
26
  secure: "AlnBx0dBSxn+S97n0h14ltKUOA+6v0bc7QZPIcwGJV9nnf1hKH3pf9La1TVknEx7XgpAcM9jusQJ7hBlqvSq8z8SFF0bZk1EgSRIKc1cuYPLiGyUM2O7+AFHyCy3iCnPvKeoQmE/BJb5O1dGnbmSbf4A0fqLxA7jiHG1j7z+cnmJB1i67wovDfl13TsOXyBfbespWBMMc0BKAw56FPs9XggAk2cNusS3hd5tqW1AZPT2/xwt+d8ngkmO96u8QcichYRFQ+w+XW4H0w935wNg/dWiskJlt7TIYVAh4Ko5s2DZKf52Tne8TugALSn0LhRatpp7sw1FTTpteCW8UqK8uwGC2hM4pZViAOv4P1YObz2IPOZPriBl+cCayJdMKnotkUJliAMnw5TLiSWKLou+S0Pdj2h3fJZWdOEwRPMzIVoJtsOHG3GdNcPL6f7iU0vP/wr6FeR3uWa+fA7NHRi2Du955O8JpogjdrW08ahcAEwhtI3A4mrA08wN09axsrwr093uDRm/5h4FHyAhExJ0YiA/6kcPpUvILcLStyHe0RQDICQMdsQo2DSbnL65w3QjFa2fML2Shf9cRwX06+ia2BxozWzFD/6p3RiRtPxphnbFiUdjYSGWcwCcUgbJx9SW04lSSxOhpyItuXgxZqiybkzstXd6riu5zwg1R8TWk34="
29
27
  on:
30
28
  tags: true
31
- rvm: 2.1.9
29
+ rvm: 2.4.2
32
30
  condition: "($SKIP_PUBLISH != true)"
33
31
  - provider: releases
34
32
  api_key:
35
33
  secure: "RoQepMSpEzpTLgSYP1apB8AcKNMoumqe/emNg9lIu4T55t7fCPVZFmoTL2/VCjpGpBY3SL6PijSRelY6B1bri+6SFz/hlWhCQ8t1hodrEX23ieFBwWyLI7TFvrCjVejkJwaj7N2nYUQBv8YxScbRp4daFaDhrPJMrfqKZUlBBQ2KEUvqienOn7Tdt4OQ7/ThRXlhBm8OGjZfaKyWDyJykef+yC1scJrl8HA71XRHxho/iojTRPqJJCKW1QNmomVWAwK6ZEvb2WrD27yZN60wEcygdbmzKxlAXrfp13Ho+ir2GjRXJr1VKNPecFTDe21fDFMLZ5VxZgOJ7TWnhz2UAQIPjDTLzEMuJci7DDvRCWMJ17pYurm0OGAeKPWZbtf5PLYouKvnjNsfY8vy+Ip6MqmhiXqqLSO9XN/jgEVFPHj8pOj0DDq6PtTB8dNJj7g60Ak0Uj5iole4/ef1DHv803/t9J6IVqULmYZREqeTg24KkZLfTSEbkhYMGjbCZGaSAGhAFLAAjEDTM19/k50TXnNt5smn31Mqt45PULcrHP4+t6hM+IsX9w05aOlcvfwWiBm9nPlBPeRn59wZ64+T729i5wgkhFcHmYE/2Ql1Hvz5FebyxJQziyw6eRvCVASTtFEkuT+Noy3v4u3G4fQl/S2OeCP4v6Fs0wlImzFE1lA="
36
34
  on:
37
35
  tags: true
38
- rvm: 2.1.9
36
+ rvm: 2.4.2
39
37
  condition: "($SKIP_PUBLISH != true)"
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 1.10.8 / 2018-05-18
2
+ * New env var BEAKER_no_fix_interfaces, set to skip the fix that brings up all
3
+ vagrant interfaces
4
+ * Parallelized pre-test setup actions that are used across all hosts using `block_on`
5
+ * Add runtime dependency on `highline` for the `inspec` reporting
6
+
1
7
  ### 1.10.7 / 2018-05-11
2
8
  * Updated README
3
9
  * Changed acceptance tests to use `beaker:suites`
data/README.md CHANGED
@@ -343,6 +343,10 @@ this will _not_ update modules that are already present under
343
343
  #### `BEAKER_stringify_facts`
344
344
  #### `BEAKER_use_fixtures_dir_for_modules`
345
345
 
346
+ #### `BEAKER_no_fix_interfaces`
347
+
348
+ Set to skip code that makes sure all interfaces are up
349
+
346
350
  #### PUPPET_VERSION
347
351
 
348
352
  The `PUPPET_VERSION` environment variable will install the latest
@@ -165,7 +165,7 @@ module Simp::BeakerHelpers
165
165
  opts[:pluginsync] = opts.fetch(:pluginsync, true)
166
166
 
167
167
  unless ENV['BEAKER_copy_fixtures'] == 'no'
168
- Array(suts).each do |sut|
168
+ block_on(suts, :run_in_parallel => true) do |sut|
169
169
  STDERR.puts " ** copy_fixture_modules_to: '#{sut}'" if ENV['BEAKER_helpers_verbose']
170
170
 
171
171
  # Use spec_prep to provide modules (this supports isolated networks)
@@ -214,7 +214,7 @@ module Simp::BeakerHelpers
214
214
  def enable_fips_mode_on( suts = hosts )
215
215
  puts '== configuring FIPS mode on SUTs'
216
216
  puts ' -- (use BEAKER_fips=no to disable)'
217
- suts.each do |sut|
217
+ block_on(suts, :run_in_parallel => true) do |sut|
218
218
  puts " -- enabling FIPS on '#{sut}'"
219
219
 
220
220
  # We need to use FIPS compliant algorithms and keylengths as per the FIPS
@@ -327,7 +327,7 @@ DEFAULT_KERNEL_TITLE=`/sbin/grubby --info=\\\${DEFAULT_KERNEL_INFO} | grep -m1 t
327
327
  :timeout
328
328
  ]
329
329
 
330
- Array(suts).each do |sut|
330
+ block_on(suts, :run_in_parallel => true) do |sut|
331
331
  if sut['yum_repos']
332
332
  sut['yum_repos'].each_pair do |repo, metadata|
333
333
  repo_manifest = %(yumrepo { #{repo}:)
@@ -363,7 +363,7 @@ DEFAULT_KERNEL_TITLE=`/sbin/grubby --info=\\\${DEFAULT_KERNEL_INFO} | grep -m1 t
363
363
  # Apply known OS fixes we need to run Beaker on each SUT
364
364
  def fix_errata_on( suts = hosts )
365
365
 
366
- suts.each do |sut|
366
+ block_on(suts, :run_in_parallel => true) do |sut|
367
367
  # We need to be able to flip between server and client without issue
368
368
  on sut, 'puppet resource group puppet gid=52'
369
369
  on sut, 'puppet resource user puppet comment="Puppet" gid="52" uid="52" home="/var/lib/puppet" managehome=true'
@@ -430,7 +430,7 @@ DEFAULT_KERNEL_TITLE=`/sbin/grubby --info=\\\${DEFAULT_KERNEL_INFO} | grep -m1 t
430
430
  host_entry = { fqdn => [] }
431
431
 
432
432
  # Ensure that all interfaces are active prior to collecting data
433
- activate_interfaces(host)
433
+ activate_interfaces(host) unless ENV['BEAKER_no_fix_interfaces']
434
434
 
435
435
  # Gather the IP Addresses for the host to embed in the cert
436
436
  interfaces = fact_on(host, 'interfaces').strip.split(',')
@@ -556,8 +556,10 @@ done
556
556
  #
557
557
  # Can be passed any number of hosts either singly or as an Array
558
558
  def activate_interfaces(hosts)
559
- Array(hosts).each do |host|
560
- interfaces = fact_on(host, 'interfaces').strip.split(',')
559
+ block_on(hosts, :run_in_parallel => true) do |host|
560
+ interfaces_fact = retry_on(host,'facter interfaces', verbose: true).stdout
561
+
562
+ interfaces = interfaces_fact.strip.split(',')
561
563
  interfaces.delete_if { |x| x =~ /^lo/ }
562
564
 
563
565
  interfaces.each do |iface|
@@ -585,7 +587,7 @@ done
585
587
  # We can't guarantee that the upstream vendor isn't disabling interfaces so
586
588
  # we need to turn them on at each context run
587
589
  c.before(:context) do
588
- activate_interfaces(hosts)
590
+ activate_interfaces(hosts) unless ENV['BEAKER_no_fix_interfaces']
589
591
  end
590
592
 
591
593
  c.after(:all) do
@@ -680,7 +682,7 @@ done
680
682
  noop => false
681
683
  }
682
684
  PLUGINSYNC_MANIFEST
683
- apply_manifest_on(hosts, pluginsync_manifest)
685
+ apply_manifest_on(hosts, pluginsync_manifest, :run_in_parallel => true)
684
686
  end
685
687
 
686
688
 
@@ -1,5 +1,5 @@
1
1
  module Simp; end
2
2
 
3
3
  module Simp::BeakerHelpers
4
- VERSION = '1.10.7'
4
+ VERSION = '1.10.8'
5
5
  end
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.add_runtime_dependency 'beaker', '~> 3.14'
22
22
  s.add_runtime_dependency 'beaker-puppet', '~> 0.8.0'
23
23
  s.add_runtime_dependency 'beaker-puppet_install_helper', '~> 0.6'
24
+ s.add_runtime_dependency 'highline', '~> 1.6'
24
25
 
25
26
  ### s.files = Dir['Rakefile', '{bin,lib,spec}/**/*', 'README*', 'LICENSE*'] & `git ls-files -z .`.split("\0")
26
27
  s.files = `git ls-files`.split("\n")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-beaker-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.7
4
+ version: 1.10.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-05-15 00:00:00.000000000 Z
12
+ date: 2018-06-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: beaker
@@ -53,6 +53,20 @@ dependencies:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0.6'
56
+ - !ruby/object:Gem::Dependency
57
+ name: highline
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '1.6'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.6'
56
70
  description: |2
57
71
  Beaker helper methods to help scaffold SIMP acceptance tests
58
72
  email: simp@simp-project.org
@@ -62,6 +76,7 @@ extra_rdoc_files: []
62
76
  files:
63
77
  - ".fixtures.yml"
64
78
  - ".gitignore"
79
+ - ".gitlab-ci.yml"
65
80
  - ".rspec"
66
81
  - ".rubocop.yml"
67
82
  - ".travis.yml"
@@ -116,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
131
  version: '0'
117
132
  requirements: []
118
133
  rubyforge_project:
119
- rubygems_version: 2.7.6
134
+ rubygems_version: 2.7.7
120
135
  signing_key:
121
136
  specification_version: 4
122
137
  summary: beaker helper methods for SIMP