Skip to content

Commit b13c96b

Browse files
committed
(CONT-494) PDK Update
1 parent 7c37c9b commit b13c96b

File tree

8 files changed

+154
-14
lines changed

8 files changed

+154
-14
lines changed

.gitlab-ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
stages:
3+
- syntax
4+
- unit
5+
6+
default:
7+
cache:
8+
paths:
9+
- vendor/bundle
10+
11+
before_script: &before_script
12+
- bundle -v
13+
- rm Gemfile.lock || true
14+
- "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner"
15+
- "# Set `rubygems_version` in the .sync.yml to set a value"
16+
- "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set"
17+
- '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION'
18+
- gem --version
19+
- bundle -v
20+
- bundle install --without system_tests --path vendor/bundle --jobs $(nproc)
21+
22+
validate lint check rubocop-Ruby 2.5.7-Puppet ~> 6:
23+
stage: syntax
24+
image: ruby:2.5.7
25+
script:
26+
- bundle exec rake validate lint check rubocop
27+
variables:
28+
PUPPET_GEM_VERSION: '~> 6'
29+
30+
parallel_spec-Ruby 2.5.7-Puppet ~> 6:
31+
stage: unit
32+
image: ruby:2.5.7
33+
script:
34+
- bundle exec rake parallel_spec
35+
variables:
36+
PUPPET_GEM_VERSION: '~> 6'
37+
38+
validate lint check rubocop-Ruby 2.7.2-Puppet ~> 7:
39+
stage: syntax
40+
image: ruby:2.7.2
41+
script:
42+
- bundle exec rake validate lint check rubocop
43+
variables:
44+
PUPPET_GEM_VERSION: '~> 7'
45+
46+
parallel_spec-Ruby 2.7.2-Puppet ~> 7:
47+
stage: unit
48+
image: ruby:2.7.2
49+
script:
50+
- bundle exec rake parallel_spec
51+
variables:
52+
PUPPET_GEM_VERSION: '~> 7'
53+

.puppet-lint.rc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
--relative
2-
--no-relative_classname_inclusion-check
3-
--no-parameter_types-check
4-
--no-top_scope_facts-check
5-
--no-legacy_facts-check

.travis.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
os: linux
3+
dist: xenial
4+
language: ruby
5+
cache: bundler
6+
before_install:
7+
- bundle -v
8+
- rm -f Gemfile.lock
9+
- "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner"
10+
- "# See https://github.com/puppetlabs/pdk-templates/commit/705154d5c437796b821691b707156e1b056d244f for an example of how this was used"
11+
- "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set"
12+
- '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION'
13+
- gem --version
14+
- bundle -v
15+
script:
16+
- 'bundle exec rake $CHECK'
17+
bundler_args: --without system_tests
18+
rvm:
19+
- 2.5.7
20+
stages:
21+
- static
22+
- spec
23+
- acceptance
24+
-
25+
if: tag =~ ^v\d
26+
name: deploy
27+
jobs:
28+
fast_finish: true
29+
include:
30+
-
31+
env: CHECK="validate lint check rubocop"
32+
stage: static
33+
-
34+
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
35+
rvm: 2.5.7
36+
stage: spec
37+
-
38+
env: DEPLOY_TO_FORGE=yes
39+
stage: deploy
40+
branches:
41+
only:
42+
- main
43+
- /^v\d/
44+
notifications:
45+
email: false

Gemfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ def location_for(place_or_version, fake_version = nil)
1414
end
1515

1616
group :development do
17-
gem "json", '~> 2.0', require: false
18-
gem "voxpupuli-puppet-lint-plugins", '~> 3.0', require: false
17+
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
18+
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
19+
gem "json", '= 2.5.1', require: false if Gem::Requirement.create(['>= 3.0.0', '< 3.0.5']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
20+
gem "json", '= 2.6.1', require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
21+
gem "json", '= 2.6.3', require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
22+
gem "voxpupuli-puppet-lint-plugins", '~> 3.1', require: false
1923
gem "facterdb", '~> 1.18', require: false
2024
gem "metadata-json-lint", '>= 2.0.2', '< 4.0.0', require: false
2125
gem "puppetlabs_spec_helper", '>= 3.0.0', '< 5.0.0', require: false
@@ -30,7 +34,6 @@ group :development do
3034
gem "rubocop-performance", '= 1.9.1', require: false
3135
gem "rubocop-rspec", '= 2.0.1', require: false
3236
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
33-
gem "github_changelog_generator", require: false
3437
end
3538
group :system_tests do
3639
gem "puppet_litmus", '< 1.0.0', require: false, platforms: [:ruby]

Rakefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,13 @@ def changelog_future_release
4242
end
4343

4444
PuppetLint.configuration.send('disable_relative')
45-
PuppetLint.configuration.send('disable_relative_classname_inclusion')
46-
PuppetLint.configuration.send('disable_parameter_types')
47-
PuppetLint.configuration.send('disable_top_scope_facts')
48-
PuppetLint.configuration.send('disable_legacy_facts')
4945

5046

5147
if Bundler.rubygems.find_name('github_changelog_generator').any?
5248
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
5349
raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil?
5450
config.user = "#{changelog_user}"
5551
config.project = "#{changelog_project}"
56-
config.since_tag = "v3.0.0"
5752
config.future_release = "#{changelog_future_release}"
5853
config.exclude_labels = ['maintenance']
5954
config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)."

appveyor.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
version: 1.1.x.{build}
3+
skip_branch_with_pr: true
4+
branches:
5+
only:
6+
- main
7+
- release
8+
skip_commits:
9+
message: /^\(?doc\)?.*/
10+
clone_depth: 10
11+
init:
12+
- SET
13+
- 'mkdir C:\ProgramData\PuppetLabs\code && exit 0'
14+
- 'mkdir C:\ProgramData\PuppetLabs\facter && exit 0'
15+
- 'mkdir C:\ProgramData\PuppetLabs\hiera && exit 0'
16+
- 'mkdir C:\ProgramData\PuppetLabs\puppet\var && exit 0'
17+
environment:
18+
matrix:
19+
-
20+
RUBY_VERSION: 25-x64
21+
CHECK: validate lint check rubocop
22+
-
23+
PUPPET_GEM_VERSION: ~> 6.0
24+
RUBY_VERSION: 25
25+
CHECK: parallel_spec
26+
-
27+
PUPPET_GEM_VERSION: ~> 6.0
28+
RUBY_VERSION: 25-x64
29+
CHECK: parallel_spec
30+
matrix:
31+
fast_finish: true
32+
install:
33+
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
34+
- bundle install --jobs 4 --retry 2 --without system_tests
35+
- type Gemfile.lock
36+
build: off
37+
test_script:
38+
- bundle exec puppet -V
39+
- ruby -v
40+
- gem -v
41+
- bundle -v
42+
- bundle exec rake %CHECK%
43+
notifications:
44+
- provider: Email
45+
to:
46+
47+
on_build_success: false
48+
on_build_failure: false
49+
on_build_status_changed: false

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@
8383
}
8484
],
8585
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
86-
"template-ref": "tags/2.6.0-0-gd0490b9",
86+
"template-ref": "2.7.1-0-g9a16c87",
8787
"pdk-version": "2.5.0"
8888
}

spec/spec_helper.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
end
4747
c.filter_run_excluding(bolt: true) unless ENV['GEM_BOLT']
4848
c.after(:suite) do
49-
RSpec::Puppet::Coverage.report!(0)
5049
end
5150

5251
# Filter backtrace noise

0 commit comments

Comments
 (0)