Skip to content

Commit 9575cfd

Browse files
authored
Merge pull request #484 from eimlav/modules-9029
(MODULES-9029) Update pdk-template to 46a1deb
2 parents fd094e8 + afe885c commit 9575cfd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+3216
-2634
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
/convert_report.txt
2323
/update_report.txt
2424
.DS_Store
25+
.project
26+
.envrc
27+
/inventory.yaml

.pdkignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,21 @@
2222
/convert_report.txt
2323
/update_report.txt
2424
.DS_Store
25+
.project
26+
.envrc
27+
/inventory.yaml
28+
/appveyor.yml
29+
/.fixtures.yml
30+
/Gemfile
31+
/.gitattributes
32+
/.gitignore
33+
/.gitlab-ci.yml
34+
/.pdkignore
35+
/Rakefile
36+
/rakelib/
37+
/.rspec
38+
/.rubocop.yml
39+
/.travis.yml
40+
/.yardopts
41+
/spec/
42+
/.vscode/

.puppet-lint.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--relative

.rubocop.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
2-
require: rubocop-rspec
2+
require:
3+
- rubocop-rspec
4+
- rubocop-i18n
35
AllCops:
46
DisplayCopNames: true
5-
TargetRubyVersion: '2.3'
7+
TargetRubyVersion: '2.1'
68
Include:
79
- "./**/*.rb"
810
Exclude:
@@ -12,18 +14,15 @@ AllCops:
1214
- "**/Rakefile"
1315
- pkg/**/*
1416
- spec/fixtures/**/*
15-
- spec/classes/**/*
16-
- spec/acceptance/**/*
17-
- spec/acceptance_swarm/**/*
18-
- spec/defines/**/*
19-
- spec/unit/**/*
2017
- vendor/**/*
2118
- "**/Puppetfile"
2219
- "**/Vagrantfile"
2320
- "**/Guardfile"
2421
Metrics/LineLength:
2522
Description: People have wide screens, use them.
2623
Max: 200
24+
GetText:
25+
Enabled: false
2726
GetText/DecorateString:
2827
Description: We don't want to decorate test output.
2928
Exclude:
@@ -75,6 +74,7 @@ Style/TrailingCommaInLiteral:
7574
Style/SymbolArray:
7675
Description: Using percent style obscures symbolic intent of array's contents.
7776
EnforcedStyle: brackets
77+
inherit_from: ".rubocop_todo.yml"
7878
RSpec/MessageSpies:
7979
EnforcedStyle: receive
8080
Style/Documentation:
@@ -125,7 +125,3 @@ Style/IfUnlessModifier:
125125
Enabled: false
126126
Style/SymbolProc:
127127
Enabled: false
128-
Style/SafeNavigation:
129-
Description: Does not work with all ruby versions
130-
Exclude:
131-
- lib/puppet/parser/functions/docker_exec_flags.rb

.sync.yml

Lines changed: 33 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,43 @@
11
---
2+
.gitlab-ci.yml:
3+
delete: true
4+
5+
.rubocop.yml:
6+
default_configs:
7+
inherit_from: .rubocop_todo.yml
8+
require:
9+
- rubocop-rspec
10+
211
.travis.yml:
3-
bundler_args: ' '
12+
docker_sets:
13+
- set: docker/debian-8
14+
- set: docker/ubuntu-14.04
15+
docker_defaults:
16+
bundler_args: ""
17+
secure: ""
418
branches:
519
- release
6-
remove_includes:
7-
-
8-
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
9-
rvm: 2.1.9
10-
includes:
11-
-
12-
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
13-
rvm: 2.3.3
20+
21+
appveyor.yml:
22+
delete: true
1423

1524
Gemfile:
16-
required:
25+
optional:
1726
':development':
18-
- gem: 'facter'
19-
version: '>= 1.7.0'
20-
- gem: "rspec-retry"
21-
- gem: 'thor'
22-
- gem: 'semantic_puppet'
23-
- gem: 'beaker-rspec'
24-
from_env: BEAKER_RSPEC_VERSION
25-
- gem: "beaker"
26-
version: '~> 2.0'
27-
from_env: BEAKER_VERSION
27+
- gem: 'github_changelog_generator'
28+
git: 'https://github.com/skywinder/github-changelog-generator'
29+
ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018'
30+
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')"
31+
required:
32+
':system_tests':
2833
- gem: 'puppet-module-posix-system-r#{minor_version}'
2934
platforms: ruby
30-
- gem: 'rspec'
31-
version: '~> 2.0'
32-
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('1.8.7') && Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('1.9')"
33-
- gem: 'rake'
34-
version: '~> 10.0'
35-
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('1.8.7') && Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('1.9')"
36-
37-
Rakefile:
38-
requires:
39-
- puppet-lint/tasks/puppet-lint
40-
- puppetlabs_spec_helper/rake_tasks
41-
- metadata-json-lint/rake_task
42-
- rspec_junit_formatter
43-
- puppet_pot_generator/rake_tasks
44-
45-
.rubocop.yml:
46-
include_todos:
47-
inherit_from: '.rubocop_todo.yml'
48-
profiles:
49-
strict:
50-
configs:
51-
AllCops:
52-
TargetRubyVersion: '2.2'
53-
Exclude:
54-
- spec/defines/*
55-
- spec/classes/*
56-
- spec/*
57-
- spec/acceptance/*
58-
- rakelib/*
59-
35+
- gem: 'puppet-module-win-system-r#{minor_version}'
36+
platforms:
37+
- mswin
38+
- mingw
39+
- x64_mingw
40+
- gem: 'rspec-retry'
6041

61-
.gitlab-ci.yml:
62-
delete: true
63-
64-
appveyor.yml:
65-
delete: true
42+
spec/spec_helper.rb:
43+
unmanaged: true

.travis.yml

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,63 @@
11
---
2-
sudo: false
3-
dist: trusty
42
language: ruby
53
cache: bundler
64
before_install:
75
- bundle -v
86
- rm -f Gemfile.lock
9-
- gem update --system
7+
- gem update --system $RUBYGEMS_VERSION
108
- gem --version
119
- bundle -v
1210
script:
13-
- 'bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
14-
- 'bundle exec rake parallel_spec'
15-
bundler_args:
11+
- 'bundle exec rake $CHECK'
12+
bundler_args: --without system_tests
1613
rvm:
17-
- 2.4.4
18-
env:
19-
- PUPPET_GEM_VERSION="~> 4.0"
20-
- PUPPET_GEM_VERSION="~> 5.0"
21-
- PUPPET_GEM_VERSION="~> 6.0"
14+
- 2.5.3
15+
stages:
16+
- static
17+
- spec
18+
- acceptance
19+
-
20+
if: tag =~ ^v\d
21+
name: deploy
2222
matrix:
2323
fast_finish: true
24+
include:
25+
-
26+
bundler_args:
27+
dist: trusty
28+
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/debian-8 BEAKER_TESTMODE=apply
29+
rvm: 2.5.3
30+
script: bundle exec rake beaker
31+
services: docker
32+
stage: acceptance
33+
sudo: required
34+
-
35+
bundler_args:
36+
dist: trusty
37+
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/ubuntu-14.04 BEAKER_TESTMODE=apply
38+
rvm: 2.5.3
39+
script: bundle exec rake beaker
40+
services: docker
41+
stage: acceptance
42+
sudo: required
43+
-
44+
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
45+
stage: static
46+
-
47+
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
48+
rvm: 2.4.5
49+
stage: spec
50+
-
51+
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
52+
rvm: 2.5.3
53+
stage: spec
54+
-
55+
env: DEPLOY_TO_FORGE=yes
56+
stage: deploy
2457
branches:
2558
only:
2659
- master
2760
- /^v\d/
61+
- release
2862
notifications:
2963
email: false
30-
deploy:
31-
provider: puppetforge
32-
user: puppet
33-
password:
34-
secure: ""
35-
on:
36-
tags: true
37-
all_branches: true
38-
condition: "$DEPLOY_TO_FORGE = yes"

Gemfile

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,22 @@ ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
1717
minor_version = ruby_version_segments[0..1].join('.')
1818

1919
group :development do
20-
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
21-
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
22-
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
23-
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
24-
gem "json", '<= 2.0.4', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.4.4')
25-
gem "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
26-
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
27-
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
28-
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
20+
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
21+
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
22+
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
23+
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
24+
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
25+
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))
26+
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
27+
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
28+
gem "puppet-module-win-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
29+
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
30+
gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
2931
end
30-
3132
group :system_tests do
32-
gem "beaker-puppet_install_helper", :require => false
33-
gem "beaker-rspec"
34-
gem "beaker", "~> 3.13"
35-
gem "rspec"
36-
gem "rspec-retry"
33+
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
34+
gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
35+
gem "rspec-retry", require: false
3736
end
3837

3938
puppet_version = ENV['PUPPET_GEM_VERSION']

Rakefile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ end
1414

1515
def changelog_project
1616
return unless Rake.application.top_level_tasks.include? "changelog"
17-
returnVal = nil || JSON.load(File.read('metadata.json'))['name']
17+
returnVal = nil || JSON.load(File.read('metadata.json'))['source'].match(%r{.*/([^/]*)})[1]
1818
raise "unable to find the changelog_project in .sync.yml or the name in metadata.json" if returnVal.nil?
1919
puts "GitHubChangelogGenerator project:#{returnVal}"
2020
returnVal
2121
end
2222

2323
def changelog_future_release
2424
return unless Rake.application.top_level_tasks.include? "changelog"
25-
returnVal = JSON.load(File.read('metadata.json'))['version']
25+
returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version']
2626
raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
2727
puts "GitHubChangelogGenerator future_release:#{returnVal}"
2828
returnVal
@@ -74,12 +74,3 @@ EOM
7474
end
7575
end
7676

77-
desc 'Run syntax, lint and metadata tests'
78-
task :test => [
79-
:syntax,
80-
:lint,
81-
:metadata_lint,
82-
:spec,
83-
]
84-
85-

metadata.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"version_requirement": ">= 4.2.1 < 7.0.0"
7171
}
7272
],
73-
"pdk-version": "1.8.0",
74-
"template-url": "file:///opt/puppetlabs/pdk/share/cache/pdk-templates.git",
75-
"template-ref": "1.8.0-0-g0d9da00"
73+
"pdk-version": "1.10.0",
74+
"template-url": "https://github.com/puppetlabs/pdk-templates.git#master",
75+
"template-ref": "heads/master-0-g46a1deb"
7676
}

0 commit comments

Comments
 (0)