r10k 4.1.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 030acd30658f5b8fdf89d1c18512defc7273e39545066e66bc9cd3cd0c16294d
4
- data.tar.gz: 1548b9b6d4ce6f136eee88c5504fbcdc781fce4fee5ce847097d8f0a9b18e849
3
+ metadata.gz: 9a0847e57e56c69ecd6983bbe2f5c73b82a4a2ef81c507b1920549ca18fac27f
4
+ data.tar.gz: a2aba2cf1697aaa3acbeb098392c2caaabdbf7e9007b072aecf2ad70ba9dd2aa
5
5
  SHA512:
6
- metadata.gz: be34df44f090809213bb34ca283172c41825f4ccd9b9e50568021d12df30b6c659e87e523e8e2cb1ee8ae0a5acbca806e5e26c8693b3b13adeb00a5912f446d7
7
- data.tar.gz: 8ce2f367c6f2367f7bfabc89a9f60e69ac983e4a6b1b142de56be5f137d43f592a51297bd1b507b8b33f6acee399a9280f5ad8dd770753e3747a5e7ba02ed6d9
6
+ metadata.gz: b05b0aa7c3aa2606e5a8c5637820da64c4fc01f9211314c4f0c39a3f9d2095ff95c83fb0cd46c88579203ddc68d1559a4c45073eb8be9070fbddc4371de0d8cd
7
+ data.tar.gz: 10e697e58297c7e13b066ad492c386847cccc1311c07718d842e39e679cbc5a1b2db3bdfa2bb941f0640368acb8d9794508eb8bb3279ce393b3ca3e44a0240cb
@@ -22,10 +22,10 @@ jobs:
22
22
  with: # This doesn't seem to work unless we point directly to the secrets
23
23
  username: ${{ secrets.DOCKERHUB_USERNAME }}
24
24
  password: ${{ secrets.DOCKERHUB_PASSWORD }}
25
- - name: Set up Ruby 2.6
26
- uses: actions/setup-ruby@v1
25
+ - name: Set up Ruby 3.1
26
+ uses: ruby/setup-ruby@v1
27
27
  with:
28
- ruby-version: 2.6.x
28
+ ruby-version: 3.1
29
29
  - run: gem install bundler
30
30
  - uses: actions/checkout@v3
31
31
  - name: Set up QEMU
@@ -4,6 +4,7 @@ on:
4
4
  push:
5
5
  branches:
6
6
  - main
7
+ - 3.x
7
8
  paths:
8
9
  - 'lib/r10k/version.rb'
9
10
 
@@ -15,7 +16,7 @@ jobs:
15
16
  with:
16
17
  fetch-depth: '0'
17
18
  - name: Bump version and push tag
18
- uses: anothrNick/github-tag-action@1.67.0
19
+ uses: anothrNick/github-tag-action@1.71.0
19
20
  env:
20
21
  GITHUB_TOKEN: ${{ secrets.PUPPET_RELEASE_GH_TOKEN }}
21
22
  DEFAULT_BUMP: patch
@@ -12,14 +12,12 @@ jobs:
12
12
  strategy:
13
13
  matrix:
14
14
  cfg:
15
- - {os: ubuntu-latest, ruby: 2.6}
16
- - {os: ubuntu-latest, ruby: 2.7}
17
15
  - {os: ubuntu-latest, ruby: 3.1}
18
16
  - {os: ubuntu-latest, ruby: 3.2}
19
- - {os: ubuntu-latest, ruby: jruby-9.3}
17
+ - {os: ubuntu-latest, ruby: 3.3}
20
18
  - {os: ubuntu-latest, ruby: jruby-9.4}
21
- - {os: windows-latest, ruby: 2.6}
22
19
  - {os: windows-latest, ruby: 3.2}
20
+ - {os: windows-latest, ruby: 3.3}
23
21
 
24
22
  runs-on: ${{ matrix.cfg.os }}
25
23
  steps:
data/CHANGELOG.mkd CHANGED
@@ -4,6 +4,16 @@ CHANGELOG
4
4
  Unreleased
5
5
  ----------
6
6
 
7
+ 5.0.0
8
+ -----
9
+
10
+ - Add Ruby 3.3 to CI [#1403](https://github.com/puppetlabs/r10k/pull/1403)
11
+ - Require Ruby 3.1 [#1402](https://github.com/puppetlabs/r10k/pull/1402)
12
+ - Replace deprecated action: actions/setup-ruby->ruby/setup-ruby [#1406](https://github.com/puppetlabs/r10k/pull/1406)
13
+ - Ensure git repositories are pruned on fetch [#1410](https://github.com/puppetlabs/r10k/pull/1410)
14
+ - Limit Rugged Control Repo refspec to only clone refs/heads [#1412](https://github.com/puppetlabs/r10k/pull/1412)
15
+ - Allow librarian exclusion declaration as a noop
16
+
7
17
  4.1.0
8
18
  -----
9
19
 
@@ -33,6 +43,10 @@ Unreleased
33
43
  - (RK-383) Remove deprecated `basedir` method from Puppetfile DSL. Users should use `environment_name` instead. [#1254](https://github.com/puppetlabs/r10k/pull/1254)
34
44
  - (RK-386) Remove deprecated `bare` environment type. [#1235](https://github.com/puppetlabs/r10k/issues/1235)
35
45
 
46
+ 3.16.2
47
+ ------
48
+
49
+ - r10k::module::git: expose remote as getter [#1379](https://github.com/puppetlabs/r10k/pull/1379)
36
50
 
37
51
  3.16.1
38
52
  ------
data/integration/Gemfile CHANGED
@@ -10,10 +10,9 @@ def location_for(place, fake_version = nil)
10
10
  end
11
11
  end
12
12
 
13
- gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '~> 4.5')
13
+ gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '~> 4.40')
14
14
  gem 'beaker-pe', '~> 3.0'
15
- gem 'beaker-answers'
16
15
  gem 'beaker-hostgenerator', *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'] || '~> 1.1')
17
16
  gem 'beaker-abs', *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.4')
18
- gem 'rototiller', '= 0.1.0'
17
+ gem 'rototiller', '= 1.0'
19
18
  gem 'beaker-qa-i18n'
data/integration/Rakefile CHANGED
@@ -20,24 +20,6 @@ end
20
20
  desc 'The acceptance tests for r10k, run in the beaker framework'
21
21
  rototiller_task :beaker => [:beaker_hostgenerator] do |t|
22
22
 
23
- common_setup = <<-EOS
24
- pre-suite/00_pe_install.rb,
25
- component/pre-suite/05_install_dev_r10k.rb,
26
- pre-suite/10_git_config.rb,
27
- pre-suite/20_pe_r10k.rb,
28
- EOS
29
- common_setup.gsub!("\n", '')
30
-
31
- flags = [
32
- {:name => '--hosts', :default => 'configs/generated', :override_env => 'BEAKER_HOST'},
33
- {:name => '--keyfile', :default => "#{ENV['HOME']}/.ssh/id_rsa-acceptance", :override_env => 'BEAKER_KEYFILE'},
34
- {:name => '--load-path', :default => 'lib'},
35
- {:name => '--pre-suite', :default => @acceptance_pre_suite || common_setup, :override_env => 'BEAKER_PRE_SUITE'},
36
- {:name => '--tests', :default => 'tests', :override_env => 'BEAKER_TESTS'},
37
- {:name => '--preserve-hosts', :default => 'onfail', :override_env => 'BEAKER_PRESERVE_HOSTS'},
38
- ]
39
- t.add_flag(*flags)
40
-
41
23
  t.add_env do |env|
42
24
  env.name = 'PE_FAMILY'
43
25
  env.message = 'The puppet enterprise major branch to install from'
@@ -54,7 +36,62 @@ EOS
54
36
  env.message = 'The git provider that r10k should use on a SUT'
55
37
  end
56
38
 
57
- t.add_command({:name => 'beaker --debug', :override_env => 'BEAKER_EXECUTABLE'})
39
+ t.add_command do |cmd|
40
+ cmd.name = 'beaker --debug'
41
+
42
+ common_setup = <<-EOS
43
+ pre-suite/00_pe_install.rb,
44
+ component/pre-suite/05_install_dev_r10k.rb,
45
+ pre-suite/10_git_config.rb,
46
+ pre-suite/20_pe_r10k.rb,
47
+ EOS
48
+ common_setup.gsub!("\n", '')
49
+
50
+ cmd.add_option do |opt|
51
+ opt.name = '--hosts'
52
+ opt.add_argument do |arg|
53
+ arg.name = 'configs/generated'
54
+ arg.add_env({name: 'BEAKER_HOST'})
55
+ end
56
+ end
57
+
58
+ cmd.add_option do |opt|
59
+ opt.name = '--keyfile'
60
+ opt.add_argument do |arg|
61
+ arg.name = "#{ENV['HOME']}/.ssh/id_rsa-acceptance"
62
+ arg.add_env({name: 'BEAKER_KEYFILE'})
63
+ end
64
+ end
65
+
66
+ cmd.add_option do |opt|
67
+ opt.name = '--pre-suite'
68
+ opt.add_argument do |arg|
69
+ arg.name = @acceptance_pre_suite || common_setup
70
+ arg.add_env({name: 'BEAKER_PRE_SUITE'})
71
+ end
72
+ end
73
+
74
+ cmd.add_option do |opt|
75
+ opt.name = '--tests'
76
+ opt.add_argument do |arg|
77
+ arg.name = 'tests'
78
+ arg.add_env({name: 'BEAKER_TESTS'})
79
+ end
80
+ end
81
+
82
+ cmd.add_option do |opt|
83
+ opt.name = '--preserve-hosts'
84
+ opt.add_argument do |arg|
85
+ arg.name = 'onfail'
86
+ arg.add_env({name: 'BEAKER_PRESERVE_HOSTS'})
87
+ end
88
+ end
89
+
90
+ cmd.add_option do |opt|
91
+ opt.name = '--load-path'
92
+ opt.add_argument({name: 'lib'})
93
+ end
94
+ end
58
95
  end
59
96
 
60
97
  desc 'Generate a host configuration used by Beaker'
@@ -64,12 +101,10 @@ rototiller_task :beaker_hostgenerator do |t|
64
101
  t.add_command do |c|
65
102
  c.name = 'beaker-hostgenerator'
66
103
  c.argument = '> configs/generated'
104
+ c.add_option(:name => '', :default => 'centos7-64mdca-64.fa', :override_env => 'TEST_TARGET')
105
+ c.add_option(:name => '--global-config', :default => '{forge_host=forgeapi.puppet.com}', :override_env => 'BHG_GLOBAL_CONFIG')
67
106
  end
68
107
 
69
- # This is a hack :(
70
- t.add_flag(:name => '', :default => 'centos7-64mdca-64.fa', :override_env => 'TEST_TARGET')
71
-
72
- t.add_flag(:name => '--global-config', :default => '{forge_host=forgeapi.puppet.com}', :override_env => 'BHG_GLOBAL_CONFIG')
73
108
  end
74
109
  end
75
110
 
@@ -36,6 +36,7 @@ step 'Install and Configure Git'
36
36
  on(master, puppet('apply'), :stdin => git_manifest, :acceptable_exit_codes => [0,2]) do |result|
37
37
  assert_no_match(/Error:/, result.stderr, 'Unexpected error was detected!')
38
38
  end
39
+ on(master, 'git config --system --add safe.directory "*"')
39
40
 
40
41
  step 'Create "production" Environment on Git'
41
42
  init_r10k_source_from_prod(master, git_repo_path, git_repo_name, git_environments_path, 'production')
@@ -36,7 +36,7 @@ class R10K::Git::Rugged::BareRepository < R10K::Git::Rugged::BaseRepository
36
36
  @_rugged_repo = ::Rugged::Repository.init_at(@path.to_s, true).tap do |repo|
37
37
  config = repo.config
38
38
  config['remote.origin.url'] = remote
39
- config['remote.origin.fetch'] = '+refs/*:refs/*'
39
+ config['remote.origin.fetch'] = '+refs/heads/*:refs/heads/*'
40
40
  config['remote.origin.mirror'] = 'true'
41
41
  end
42
42
 
@@ -60,7 +60,7 @@ class R10K::Git::Rugged::BareRepository < R10K::Git::Rugged::BaseRepository
60
60
  proxy = R10K::Git.get_proxy_for_remote(remote)
61
61
 
62
62
  options = {:credentials => credentials, :prune => true, :proxy_url => proxy}
63
- refspecs = ['+refs/*:refs/*']
63
+ refspecs = ['+refs/heads/*:refs/heads/*']
64
64
 
65
65
  results = nil
66
66
 
@@ -89,7 +89,7 @@ class R10K::Git::Rugged::WorkingRepository < R10K::Git::Rugged::BaseRepository
89
89
  remote = remotes[remote_name]
90
90
  proxy = R10K::Git.get_proxy_for_remote(remote)
91
91
 
92
- options = {:credentials => credentials, :proxy_url => proxy}
92
+ options = {:credentials => credentials, :proxy_url => proxy, :prune => true}
93
93
  refspecs = ["+refs/heads/*:refs/remotes/#{remote_name}/*"]
94
94
 
95
95
  results = nil
@@ -31,7 +31,7 @@ class R10K::Git::ShellGit::ThinRepository < R10K::Git::ShellGit::WorkingReposito
31
31
 
32
32
  # Fetch refs from the backing bare Git repository.
33
33
  def fetch(remote = 'cache')
34
- git ['fetch', remote], :path => @path.to_s
34
+ git ['fetch', remote, '--prune'], :path => @path.to_s
35
35
  end
36
36
 
37
37
  # @return [String] The origin remote URL
@@ -33,6 +33,10 @@ module R10K
33
33
  @librarian.set_moduledir(location)
34
34
  end
35
35
 
36
+ def exclusion(name)
37
+ # noop
38
+ end
39
+
36
40
  def method_missing(method, *args)
37
41
  raise NoMethodError, _("unrecognized declaration '%{method}'") % {method: method}
38
42
  end
data/lib/r10k/tarball.rb CHANGED
@@ -173,7 +173,7 @@ module R10K
173
173
  def each_tarball_entry(&block)
174
174
  File.open(cache_path, 'rb') do |file|
175
175
  Zlib::GzipReader.wrap(file) do |reader|
176
- Archive::Tar::Minitar::Input.each_entry(reader) do |entry|
176
+ Minitar::Input.each_entry(reader) do |entry|
177
177
  yield entry
178
178
  end
179
179
  end
data/lib/r10k/version.rb CHANGED
@@ -2,5 +2,5 @@ module R10K
2
2
  # When updating to a new major (X) or minor (Y) version, include `#major` or
3
3
  # `#minor` (respectively) in your commit message to trigger the appropriate
4
4
  # release. Otherwise, a new patch (Z) version will be released.
5
- VERSION = '4.1.0'
5
+ VERSION = '5.0.0'
6
6
  end
data/r10k.gemspec CHANGED
@@ -18,27 +18,21 @@ Gem::Specification.new do |s|
18
18
  dynamic environments.
19
19
  DESCRIPTION
20
20
 
21
- s.required_ruby_version = '>= 2.6.0'
21
+ s.required_ruby_version = '>= 3.1.0'
22
22
 
23
23
  s.license = 'Apache-2.0'
24
24
 
25
- s.add_dependency 'colored2', '3.1.2'
25
+ s.add_dependency 'colored2', '~> 4.0'
26
26
  s.add_dependency 'cri', '>= 2.15.10'
27
-
28
27
  s.add_dependency 'log4r', '1.1.10'
29
28
  s.add_dependency 'multi_json', '~> 1.10'
30
-
31
- s.add_dependency 'puppet_forge', '>= 4.1', '< 6'
32
-
29
+ s.add_dependency 'puppet_forge', '>= 4.1.0', '< 7'
33
30
  s.add_dependency 'gettext-setup', '>=0.24', '<2.0'
34
-
35
31
  s.add_dependency 'jwt', '>= 2.2.3', '< 3'
36
- s.add_dependency 'minitar', '~> 0.9'
32
+ s.add_dependency 'minitar', '>= 0.9', '< 2'
37
33
 
38
34
  s.add_development_dependency 'rspec', '~> 3.1'
39
-
40
35
  s.add_development_dependency 'rake'
41
-
42
36
  s.add_development_dependency 'yard', '~> 0.9.11'
43
37
 
44
38
  s.files = %x[git ls-files].split($/).reject { |f| f.match(%r{^spec}) }
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r10k
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Thebo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-18 00:00:00.000000000 Z
11
+ date: 2024-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored2
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.1.2
19
+ version: '4.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '='
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 3.1.2
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: cri
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,20 +72,20 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '4.1'
75
+ version: 4.1.0
76
76
  - - "<"
77
77
  - !ruby/object:Gem::Version
78
- version: '6'
78
+ version: '7'
79
79
  type: :runtime
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
83
  - - ">="
84
84
  - !ruby/object:Gem::Version
85
- version: '4.1'
85
+ version: 4.1.0
86
86
  - - "<"
87
87
  - !ruby/object:Gem::Version
88
- version: '6'
88
+ version: '7'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: gettext-setup
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -130,16 +130,22 @@ dependencies:
130
130
  name: minitar
131
131
  requirement: !ruby/object:Gem::Requirement
132
132
  requirements:
133
- - - "~>"
133
+ - - ">="
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0.9'
136
+ - - "<"
137
+ - !ruby/object:Gem::Version
138
+ version: '2'
136
139
  type: :runtime
137
140
  prerelease: false
138
141
  version_requirements: !ruby/object:Gem::Requirement
139
142
  requirements:
140
- - - "~>"
143
+ - - ">="
141
144
  - !ruby/object:Gem::Version
142
145
  version: '0.9'
146
+ - - "<"
147
+ - !ruby/object:Gem::Version
148
+ version: '2'
143
149
  - !ruby/object:Gem::Dependency
144
150
  name: rspec
145
151
  requirement: !ruby/object:Gem::Requirement
@@ -439,7 +445,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
439
445
  requirements:
440
446
  - - ">="
441
447
  - !ruby/object:Gem::Version
442
- version: 2.6.0
448
+ version: 3.1.0
443
449
  required_rubygems_version: !ruby/object:Gem::Requirement
444
450
  requirements:
445
451
  - - ">="