Skip to content

Commit 196ae94

Browse files
authored
Merge pull request #824 from puppetlabs/pdksync_maint/pdk_update_20-04
pdksync - (Maint) PDK Update
2 parents 355b5b3 + 16f214e commit 196ae94

32 files changed

+217
-217
lines changed

.github/workflows/spec.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ jobs:
5454
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
5555
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
5656
echo STEP_START=$(date +%s) >> $GITHUB_ENV
57-
# - name: Run Static & Syntax Tests
58-
# if: ${{ github.repository_owner == 'puppetlabs' }}
59-
# run: |
60-
# buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks' -- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
57+
- name: Run Static & Syntax Tests
58+
if: ${{ github.repository_owner == 'puppetlabs' }}
59+
run: |
60+
buildevents cmd $TRACE_ID $STEP_ID 'static_syntax_checks' -- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
6161
6262
- name: Setup Spec Test Matrix
6363
id: get-matrix

.puppet-lint.rc

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

.sync.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,10 @@ spec/spec_helper.rb:
3535
unmanaged: false
3636
.travis.yml:
3737
delete: true
38+
Rakefile:
39+
extra_disabled_lint_checks:
40+
- parameter_types
41+
- legacy_facts
42+
- top_scope_facts
43+
- parameter_documentation
44+
- topscope_variable

Rakefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,18 @@ def changelog_future_release
4242
end
4343

4444
PuppetLint.configuration.send('disable_relative')
45+
PuppetLint.configuration.send('disable_parameter_types')
46+
PuppetLint.configuration.send('disable_legacy_facts')
47+
PuppetLint.configuration.send('disable_top_scope_facts')
48+
PuppetLint.configuration.send('disable_parameter_documentation')
49+
PuppetLint.configuration.send('disable_topscope_variable')
4550

4651

4752
if Bundler.rubygems.find_name('github_changelog_generator').any?
4853
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
4954
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?
5055
config.user = "#{changelog_user}"
5156
config.project = "#{changelog_project}"
52-
config.since_tag = "3.5.0"
5357
config.future_release = "#{changelog_future_release}"
5458
config.exclude_labels = ['maintenance']
5559
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)."

functions/sanitised_name.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
# [*name*]
88
# Name to sanitise
99
#
10-
function docker::sanitised_name($name){
10+
function docker::sanitised_name($name) {
1111
regsubst($name, '[^0-9A-Za-z.\-_]', '-', 'G')
1212
}

manifests/compose.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
# @param curl_ensure
3333
# Whether or not the curl package is ensured by this module.
3434
#
35-
class docker::compose(
36-
Optional[Enum[present,absent]] $ensure = 'present',
35+
class docker::compose (
36+
Enum[present,absent] $ensure = present,
3737
Optional[String] $version = $docker::params::compose_version,
3838
Optional[String] $install_path = $docker::params::compose_install_path,
3939
Optional[String] $symlink_name = $docker::params::compose_symlink_name,

manifests/exec.pp

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
# @param refreshonly
1313
# @param onlyif
1414
#
15-
define docker::exec(
16-
Optional[Boolean] $detach = false,
17-
Optional[Boolean] $interactive = false,
18-
Optional[Array] $env = [],
19-
Optional[Boolean] $tty = false,
20-
Optional[String] $container = undef,
21-
Optional[String] $command = undef,
22-
Optional[String] $unless = undef,
23-
Optional[Boolean] $sanitise_name = true,
24-
Optional[Boolean] $refreshonly = false,
25-
Optional[String] $onlyif = undef,
15+
define docker::exec (
16+
Boolean $detach = false,
17+
Boolean $interactive = false,
18+
Array $env = [],
19+
Boolean $tty = false,
20+
Optional[String] $container = undef,
21+
Optional[String] $command = undef,
22+
Optional[String] $unless = undef,
23+
Boolean $sanitise_name = true,
24+
Boolean $refreshonly = false,
25+
Optional[String] $onlyif = undef,
2626
) {
2727
include docker::params
2828

@@ -31,25 +31,23 @@
3131
if $facts['os']['family'] == 'windows' {
3232
$exec_environment = "PATH=${::docker_program_files_path}/Docker/"
3333
$exec_timeout = 3000
34-
$exec_path = [ "${::docker_program_files_path}/Docker/", ]
34+
$exec_path = ["${::docker_program_files_path}/Docker/",]
3535
$exec_provider = 'powershell'
3636
} else {
3737
$exec_environment = 'HOME=/root'
38-
$exec_path = [ '/bin', '/usr/bin', ]
38+
$exec_path = ['/bin', '/usr/bin',]
3939
$exec_timeout = 0
4040
$exec_provider = undef
4141
}
4242

43-
$docker_exec_flags = docker_exec_flags(
44-
{
43+
$docker_exec_flags = docker_exec_flags( {
4544
detach => $detach,
4645
interactive => $interactive,
4746
tty => $tty,
4847
env => any2array($env),
4948
}
5049
)
5150

52-
5351
if $sanitise_name {
5452
$sanitised_container = regsubst($container, '[^0-9A-Za-z.\-_]', '-', 'G')
5553
} else {

manifests/image.pp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
#
2626
# @param docker_dir
2727
#
28-
define docker::image(
29-
Optional[Enum[present,absent,latest]] $ensure = 'present',
30-
Optional[Pattern[/^[\S]*$/]] $image = $title,
31-
Optional[String] $image_tag = undef,
32-
Optional[String] $image_digest = undef,
33-
Optional[Boolean] $force = false,
34-
Optional[String] $docker_file = undef,
35-
Optional[String] $docker_dir = undef,
36-
Optional[String] $docker_tar = undef,
28+
define docker::image (
29+
Enum[present,absent,latest] $ensure = 'present',
30+
Optional[Pattern[/^[\S]*$/]] $image = $title,
31+
Optional[String] $image_tag = undef,
32+
Optional[String] $image_digest = undef,
33+
Boolean $force = false,
34+
Optional[String] $docker_file = undef,
35+
Optional[String] $docker_dir = undef,
36+
Optional[String] $docker_tar = undef,
3737
) {
3838
include docker::params
3939

@@ -45,14 +45,14 @@
4545
$exec_environment = "PATH=${::docker_program_files_path}/Docker/"
4646
$exec_timeout = 3000
4747
$update_docker_image_owner = undef
48-
$exec_path = [ "${::docker_program_files_path}/Docker/", ]
48+
$exec_path = ["${::docker_program_files_path}/Docker/",]
4949
$exec_provider = 'powershell'
5050
} else {
5151
$update_docker_image_template = 'docker/update_docker_image.sh.erb'
5252
$update_docker_image_path = '/usr/local/bin/update_docker_image.sh'
5353
$update_docker_image_owner = 'root'
5454
$exec_environment = 'HOME=/root'
55-
$exec_path = [ '/bin', '/usr/bin', ]
55+
$exec_path = ['/bin', '/usr/bin',]
5656
$exec_timeout = 0
5757
$exec_provider = undef
5858
}

manifests/images.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# @param images
44
#
5-
class docker::images(
5+
class docker::images (
66
$images
77
) {
88
create_resources(docker::image, $images)

manifests/init.pp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@
357357
# @param service_hasrestart
358358
# @param acknowledge_unsupported_os
359359
#
360-
class docker(
360+
class docker (
361361
Optional[String] $version = $docker::params::version,
362362
String $ensure = $docker::params::ensure,
363363
Variant[Array[String], Hash] $prerequired_packages = $docker::params::prerequired_packages,
@@ -525,8 +525,8 @@
525525
}
526526

527527
if ($bridge) and ($facts['os']['family'] == 'windows') {
528-
assert_type(Pattern[/^(none|nat|transparent|overlay|l2bridge|l2tunnel)$/], $bridge) |$a, $b| {
529-
fail('bridge must be one of none, nat, transparent, overlay, l2bridge or l2tunnel on Windows.')
528+
assert_type(Pattern[/^(none|nat|transparent|overlay|l2bridge|l2tunnel)$/], $bridge) |$a, $b| {
529+
fail('bridge must be one of none, nat, transparent, overlay, l2bridge or l2tunnel on Windows.')
530530
}
531531
}
532532

@@ -631,7 +631,6 @@
631631
$root_dir_flag = '--data-root'
632632
}
633633

634-
635634
if $ensure != 'absent' {
636635
contain docker::repos
637636
contain docker::install

0 commit comments

Comments
 (0)