Skip to content

Commit 77dafcb

Browse files
authored
Merge pull request #537 from puppetlabs/pdksync_maint/pdk_update_20-04
pdksync - (Maint) PDK Update
2 parents 0c09635 + daa068d commit 77dafcb

File tree

8 files changed

+34
-44
lines changed

8 files changed

+34
-44
lines changed

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,5 @@ jobs:
200200
repo_token: ${{ secrets.GITHUB_TOKEN }}
201201
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK }}
202202
# Optional Input
203-
channel: '#team-ia-bots'
203+
channel: '#team-cat-bots'
204204
name: 'GABot'

.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
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
vcsrepo { '/tmp/git':
2-
ensure => 'present',
3-
provider => 'git',
4-
source => 'https://github.com/git/git.git',
5-
branch => 'v2.2.0',
6-
depth => 1,
2+
ensure => 'present',
3+
provider => 'git',
4+
source => 'https://github.com/git/git.git',
5+
branch => 'v2.2.0',
6+
depth => 1,
77
}

lib/facter/vcsrepo_svn_ver.rb

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,17 @@
22

33
Facter.add(:vcsrepo_svn_ver) do
44
setcode do
5-
begin
6-
if Facter.value(:operatingsystem) == 'Darwin' && !File.directory?(Facter::Core::Execution.execute('xcode-select -p'))
7-
''
5+
if Facter.value(:operatingsystem) == 'Darwin' && !File.directory?(Facter::Core::Execution.execute('xcode-select -p'))
6+
''
7+
else
8+
version = Facter::Core::Execution.execute('svn --version --quiet')
9+
if Gem::Version.new(version) > Gem::Version.new('0.0.1')
10+
version
811
else
9-
version = Facter::Core::Execution.execute('svn --version --quiet')
10-
if Gem::Version.new(version) > Gem::Version.new('0.0.1')
11-
version
12-
else
13-
''
14-
end
12+
''
1513
end
16-
rescue StandardError
17-
''
1814
end
15+
rescue StandardError
16+
''
1917
end
2018
end

lib/puppet/provider/vcsrepo/bzr.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,9 @@ def revision
5555

5656
def revision=(desired)
5757
at_path do
58-
begin
59-
bzr('update', '-r', desired)
60-
rescue Puppet::ExecutionFailure
61-
bzr('update', '-r', desired, ':parent')
62-
end
58+
bzr('update', '-r', desired)
59+
rescue Puppet::ExecutionFailure
60+
bzr('update', '-r', desired, ':parent')
6361
end
6462
update_owner
6563
end

lib/puppet/provider/vcsrepo/git.rb

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,10 @@ def convert_bare_to_working_copy
280280

281281
def mirror?
282282
at_path do
283-
begin
284-
git_with_identity('config', '--get-regexp', 'remote\..*\.mirror')
285-
return true
286-
rescue Puppet::ExecutionFailure
287-
return false
288-
end
283+
git_with_identity('config', '--get-regexp', 'remote\..*\.mirror')
284+
return true
285+
rescue Puppet::ExecutionFailure
286+
return false
289287
end
290288
end
291289

@@ -311,11 +309,9 @@ def set_no_mirror
311309
end
312310
else
313311
@resource.value(:source).each_key do |remote|
314-
begin
315-
exec_git('config', '--unset', "remote.#{remote}.mirror")
316-
rescue Puppet::ExecutionFailure
317-
next
318-
end
312+
exec_git('config', '--unset', "remote.#{remote}.mirror")
313+
rescue Puppet::ExecutionFailure
314+
next
319315
end
320316
end
321317
end

lib/puppet/provider/vcsrepo/hg.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,10 @@ def latest?
4545

4646
def latest
4747
at_path do
48-
begin
49-
hg_wrapper('incoming', '--branch', '.', '--newest-first', '--limit', '1', remote: true)[%r{^changeset:\s+(?:-?\d+):(\S+)}m, 1]
50-
rescue Puppet::ExecutionFailure
51-
# If there are no new changesets, return the current nodeid
52-
revision
53-
end
48+
hg_wrapper('incoming', '--branch', '.', '--newest-first', '--limit', '1', remote: true)[%r{^changeset:\s+(?:-?\d+):(\S+)}m, 1]
49+
rescue Puppet::ExecutionFailure
50+
# If there are no new changesets, return the current nodeid
51+
revision
5452
end
5553
end
5654

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@
8282
}
8383
],
8484
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
85-
"template-ref": "heads/main-0-gf3911d3",
85+
"template-ref": "heads/main-0-g806810b",
8686
"pdk-version": "2.3.0"
8787
}

0 commit comments

Comments
 (0)