|
79 | 79 |
|
80 | 80 | desc 'Run spec tests and clean the fixtures directory if successful' |
81 | 81 | task :spec do |_t, args| |
82 | | - begin |
83 | | - Rake::Task[:spec_prep].invoke |
84 | | - Rake::Task[:spec_standalone].invoke(*args.extras) |
85 | | - Rake::Task[:spec_clean].invoke |
86 | | - ensure |
87 | | - Rake::Task[:spec_clean_symlinks].invoke |
88 | | - end |
| 82 | + Rake::Task[:spec_prep].invoke |
| 83 | + Rake::Task[:spec_standalone].invoke(*args.extras) |
| 84 | + Rake::Task[:spec_clean].invoke |
| 85 | +ensure |
| 86 | + Rake::Task[:spec_clean_symlinks].invoke |
89 | 87 | end |
90 | 88 |
|
91 | 89 | desc 'Run spec tests with ruby simplecov code coverage' |
|
98 | 96 |
|
99 | 97 | desc 'Run spec tests in parallel and clean the fixtures directory if successful' |
100 | 98 | task :parallel_spec do |_t, args| |
101 | | - begin |
102 | | - Rake::Task[:spec_prep].invoke |
103 | | - Rake::Task[:parallel_spec_standalone].invoke(*args.extras) |
104 | | - Rake::Task[:spec_clean].invoke |
105 | | - ensure |
106 | | - Rake::Task[:spec_clean_symlinks].invoke |
107 | | - end |
| 99 | + Rake::Task[:spec_prep].invoke |
| 100 | + Rake::Task[:parallel_spec_standalone].invoke(*args.extras) |
| 101 | + Rake::Task[:spec_clean].invoke |
| 102 | +ensure |
| 103 | + Rake::Task[:spec_clean_symlinks].invoke |
108 | 104 | end |
109 | 105 |
|
110 | 106 | desc 'Parallel spec tests' |
|
144 | 140 |
|
145 | 141 | desc 'Build Puppet module with PDK' |
146 | 142 | task :pdk do |
147 | | - begin |
148 | | - require 'pdk/util' |
149 | | - require 'pdk/module/build' |
150 | | - |
151 | | - path = PDK::Module::Build.invoke(force: true, 'target-dir': File.join(Dir.pwd, 'pkg')) |
152 | | - puts "Module built: #{path}" |
153 | | - rescue LoadError |
154 | | - _ = `pdk --version` |
155 | | - unless $CHILD_STATUS.success? |
156 | | - warn 'Unable to build module. Please install PDK or add the `pdk` gem to your Gemfile.' |
157 | | - abort |
158 | | - end |
159 | | - |
160 | | - system('pdk build --force') |
| 143 | + require 'pdk/util' |
| 144 | + require 'pdk/module/build' |
| 145 | + |
| 146 | + path = PDK::Module::Build.invoke(force: true, 'target-dir': File.join(Dir.pwd, 'pkg')) |
| 147 | + puts "Module built: #{path}" |
| 148 | + rescue LoadError |
| 149 | + _ = `pdk --version` |
| 150 | + unless $CHILD_STATUS.success? |
| 151 | + warn 'Unable to build module. Please install PDK or add the `pdk` gem to your Gemfile.' |
| 152 | + abort |
161 | 153 | end |
| 154 | + |
| 155 | + system('pdk build --force') |
162 | 156 | end |
163 | 157 | end |
164 | 158 |
|
|
183 | 177 | PuppetLint.configuration.ignore_paths << 'tests/**/*.pp' |
184 | 178 | PuppetLint.configuration.ignore_paths << 'types/**/*.pp' |
185 | 179 | PuppetLint.configuration.ignore_paths << 'vendor/**/*.pp' |
186 | | -puppet_lint_disable_checks = %w[ |
187 | | - 80chars |
188 | | - 140chars |
189 | | - class_inherits_from_params_class |
190 | | - class_parameter_defaults |
191 | | - disable_autoloader_layout |
192 | | - documentation |
193 | | - single_quote_string_with_variables |
| 180 | +puppet_lint_disable_checks = [ |
| 181 | + '80chars', |
| 182 | + '140chars', |
| 183 | + 'class_inherits_from_params_class', |
| 184 | + 'class_parameter_defaults', |
| 185 | + 'disable_autoloader_layout', |
| 186 | + 'documentation', |
| 187 | + 'single_quote_string_with_variables', |
194 | 188 | ] |
| 189 | + |
195 | 190 | puppet_lint_disable_checks.each do |check| |
196 | 191 | PuppetLint.configuration.send("disable_#{check}") |
197 | 192 | end |
|
268 | 263 | # If the branch is a release branch we append an 'r' into the new_version, |
269 | 264 | # this is due to the release branch buildID conflicting with main branch when trying to push to the staging forge. |
270 | 265 | # More info can be found at https://tickets.puppetlabs.com/browse/FM-6170 |
271 | | - new_version = if build = (ENV['BUILD_NUMBER'] || ENV['TRAVIS_BUILD_NUMBER']) |
| 266 | + new_version = if (build = (ENV['BUILD_NUMBER'] || ENV['TRAVIS_BUILD_NUMBER'])) |
272 | 267 | if branch.eql? 'release' |
273 | 268 | '%s-%s%04d-%s' % [version, 'r', build, sha] # legacy support code # rubocop:disable Style/FormatStringToken |
274 | 269 | else |
@@ -416,7 +411,7 @@ def changelog_future_release |
416 | 411 | }, |
417 | 412 | 'Added' => { |
418 | 413 | 'prefix' => '### Added', |
419 | | - 'labels' => %w[feature enhancement], |
| 414 | + 'labels' => ['feature', 'enhancement'], |
420 | 415 | }, |
421 | 416 | 'Fixed' => { |
422 | 417 | 'prefix' => '### Fixed', |
|
0 commit comments