r10k 2.4.3 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.mkd +21 -5
- data/MAINTAINERS +18 -0
- data/README.mkd +1 -4
- data/integration/tests/Puppetfile/{HTTPS_PROXY_effects_git_source.rb → HTTP_PROXY_effects_git_source.rb} +4 -4
- data/integration/tests/basic_functionality/rugged_git_provider_with_ssh.rb +2 -0
- data/integration/tests/git_source/{HTTPS_proxy_and_git_source.rb → HTTP_proxy_and_git_source.rb} +7 -7
- data/integration/tests/git_source/git_source_ssh.rb +2 -0
- data/lib/r10k/git/rugged/bare_repository.rb +6 -1
- data/lib/r10k/git/rugged/working_repository.rb +7 -2
- data/lib/r10k/version.rb +1 -1
- data/spec/integration/git/rugged/working_repository_spec.rb +26 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecd41e7eceb75aa7e13de6984208f2c3a28767e7
|
4
|
+
data.tar.gz: b7e9f3e7cf6d453094cbb80a8206fd81093b7fd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23b7f184bf1bc705e5f2dc70f6c155d92a1294538bb71c021c34415cec108522f9ea3f102d2b67b3613b60a9603bf352aa37daf69f0c5057d72d40e82a81eff3
|
7
|
+
data.tar.gz: b5f79b0e99e783c553838b73354034f5fabfe204bf453c5f4dfe65c11e50634e88c514abd5c8907af7c73056edeef50a7dc5987de9fe786aff9ba22d90dede02
|
data/.travis.yml
CHANGED
data/CHANGELOG.mkd
CHANGED
@@ -1,6 +1,22 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
=========
|
3
3
|
|
4
|
+
2.4.4
|
5
|
+
-----
|
6
|
+
2016/11/16
|
7
|
+
|
8
|
+
### Bug Fixes
|
9
|
+
|
10
|
+
(#669) Backport from 2.5.0 - Updated the behavior of the rugged based git
|
11
|
+
provider to handle unexpected behavior around checkout and resets regarding
|
12
|
+
file permissions, specifically, when resetting to an already checked out SHA
|
13
|
+
the executable bit on files would not update.
|
14
|
+
|
15
|
+
### Changes
|
16
|
+
|
17
|
+
(#664) Backport from 2.5.0 - Added to the proxy error message for changes made
|
18
|
+
to libcurl which gave new, surprising errors about unsupported proxy schemes.
|
19
|
+
|
4
20
|
2.4.3
|
5
21
|
-----
|
6
22
|
|
@@ -61,8 +77,8 @@ Puppetfile should be installed to. See the [Puppetfile documentation](https://gi
|
|
61
77
|
|
62
78
|
You can now configure how r10k purges unmanaged content after a deployment. The
|
63
79
|
default behavior should be unchanged but there is a new "purge\_levels" configuration
|
64
|
-
option that can be used to enable new behavior or de-activate certain existing
|
65
|
-
behaviors. See the relevant [
|
80
|
+
option that can be used to enable new behavior or de-activate certain existing
|
81
|
+
behaviors. See the relevant [configuration documentation](https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd#purge_levels) for more details.
|
66
82
|
|
67
83
|
(RK-223) Ability to track control repo branch from content declarations.
|
68
84
|
|
@@ -108,7 +124,7 @@ fix.)
|
|
108
124
|
Previously, r10k only supported the use of HTTP proxies for connecting to the Puppet
|
109
125
|
Forge. With these changes, r10k can now be configured to use an HTTP proxy for both
|
110
126
|
Forge and Git operations. Configuration can be specified globally, for Forge or Git
|
111
|
-
only, or on a per-Git repository basis. See [configuration documentation](https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd)
|
127
|
+
only, or on a per-Git repository basis. See [configuration documentation](https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd)
|
112
128
|
for more details.
|
113
129
|
|
114
130
|
### Bug Fixes
|
@@ -129,9 +145,9 @@ for SSH.
|
|
129
145
|
(RK-241) "deploy display" action does not properly format wrapped exceptions
|
130
146
|
|
131
147
|
The "deploy display" action was not capturing and logging exceptions in the same way as
|
132
|
-
other related actions. This meant that in many cases, when an error occurred, the
|
148
|
+
other related actions. This meant that in many cases, when an error occurred, the
|
133
149
|
underlying cause was not being shown. Specifically, the "deploy display" action was
|
134
|
-
not benefitting from the improved error messaging for unreadable SSH keys which was
|
150
|
+
not benefitting from the improved error messaging for unreadable SSH keys which was
|
135
151
|
added in r10k 2.2.0 as part of RK-220.
|
136
152
|
|
137
153
|
2.2.1
|
data/MAINTAINERS
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"version": 1,
|
3
|
+
"file_format": "This MAINTAINERS file format is described at https://github.com/puppetlabs/maintainers",
|
4
|
+
"issues": "https://tickets.puppet.com/browse/RK",
|
5
|
+
"internal_list": "https://groups.google.com/a/puppet.com/forum/?hl=en#!forum/discuss-code-manager-maintainers",
|
6
|
+
"people": [
|
7
|
+
{
|
8
|
+
"github": "andersonmills",
|
9
|
+
"email": "anderson@puppet.com",
|
10
|
+
"name": "Anderson Mills"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"github": "scotje",
|
14
|
+
"email": "jesse@puppet.com",
|
15
|
+
"name": "Jesse Scott"
|
16
|
+
}
|
17
|
+
]
|
18
|
+
}
|
data/README.mkd
CHANGED
@@ -122,9 +122,6 @@ Please see the CHANGELOG for a listing of the (very awesome) contributors.
|
|
122
122
|
|
123
123
|
## Maintenance
|
124
124
|
|
125
|
-
|
126
|
-
|
127
|
-
* Jesse Scott, jesse@puppet.com
|
128
|
-
* Anderson Mills, anderson@puppet.com
|
125
|
+
See [MAINTAINERS](MAINTAINERS) (json file)
|
129
126
|
|
130
127
|
Tickets: File at https://tickets.puppet.com/browse/RK
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'git_utils'
|
2
2
|
require 'r10k_utils'
|
3
3
|
require 'master_manipulator'
|
4
|
-
test_name 'CODEMGMT-730 - C97982 -
|
4
|
+
test_name 'CODEMGMT-730 - C97982 - HTTP_PROXY effects git source in puppetfile'
|
5
5
|
|
6
6
|
#Init
|
7
7
|
env_path = on(master, puppet('config print environmentpath')).stdout.rstrip
|
@@ -22,7 +22,7 @@ mod 'motd',
|
|
22
22
|
:git => 'https://github.com/puppetlabs/puppetlabs-motd'
|
23
23
|
EOS
|
24
24
|
|
25
|
-
proxy_env_value = '
|
25
|
+
proxy_env_value = 'http://ferritsarebest.net:3219'
|
26
26
|
|
27
27
|
#In-line files
|
28
28
|
r10k_conf = <<-CONF
|
@@ -36,7 +36,7 @@ sources:
|
|
36
36
|
CONF
|
37
37
|
|
38
38
|
teardown do
|
39
|
-
master.clear_env_var('
|
39
|
+
master.clear_env_var('HTTP_PROXY')
|
40
40
|
|
41
41
|
step 'Restore Original "r10k" Config'
|
42
42
|
on(master, "mv #{r10k_config_bak_path} #{r10k_config_path}")
|
@@ -45,7 +45,7 @@ teardown do
|
|
45
45
|
clean_up_r10k(master, last_commit, git_environments_path)
|
46
46
|
end
|
47
47
|
|
48
|
-
master.add_env_var('
|
48
|
+
master.add_env_var('HTTP_PROXY', proxy_env_value)
|
49
49
|
|
50
50
|
step 'Backup Current "r10k" Config'
|
51
51
|
on(master, "mv #{r10k_config_path} #{r10k_config_bak_path}")
|
@@ -4,6 +4,8 @@ require 'r10k_utils'
|
|
4
4
|
require 'master_manipulator'
|
5
5
|
test_name 'CODEMGMT-137 - C64160 - Use "rugged" Git Provider with Authentication'
|
6
6
|
|
7
|
+
skip_test 'refactor to use shared private key internal to puppet'
|
8
|
+
|
7
9
|
confine(:to, :platform => ['el', 'ubuntu', 'sles'])
|
8
10
|
|
9
11
|
if ENV['GIT_PROVIDER'] == 'shellgit'
|
data/integration/tests/git_source/{HTTPS_proxy_and_git_source.rb → HTTP_proxy_and_git_source.rb}
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'git_utils'
|
2
2
|
require 'r10k_utils'
|
3
3
|
require 'master_manipulator'
|
4
|
-
test_name 'CODEMGMT-730 - C97977 - Specify
|
4
|
+
test_name 'CODEMGMT-730 - C97977 - Specify HTTP_PROXY environment var and proxy for specific git source'
|
5
5
|
|
6
6
|
#Init
|
7
7
|
env_path = on(master, puppet('config print environmentpath')).stdout.rstrip
|
@@ -19,7 +19,7 @@ mod 'motd',
|
|
19
19
|
:git => 'https://github.com/puppetlabs/puppetlabs-motd'
|
20
20
|
EOS
|
21
21
|
|
22
|
-
proxy_env_value = '
|
22
|
+
proxy_env_value = 'http://cattastic.net:3219'
|
23
23
|
|
24
24
|
#In-line files
|
25
25
|
r10k_conf = <<-CONF
|
@@ -27,16 +27,16 @@ cachedir: '/var/cache/r10k'
|
|
27
27
|
git:
|
28
28
|
provider: '#{git_provider}'
|
29
29
|
repositories:
|
30
|
-
- remote: '
|
31
|
-
proxy: '
|
30
|
+
- remote: 'http://example.com/fake_git_source.git'
|
31
|
+
proxy: 'http://ilovecatvideos.com:3128'
|
32
32
|
sources:
|
33
33
|
control:
|
34
34
|
basedir: "#{env_path}"
|
35
|
-
remote: "
|
35
|
+
remote: "http://example.com/fake_git_source.git"
|
36
36
|
CONF
|
37
37
|
|
38
38
|
teardown do
|
39
|
-
master.clear_env_var('
|
39
|
+
master.clear_env_var('HTTP_PROXY')
|
40
40
|
|
41
41
|
step 'Restore Original "r10k" Config'
|
42
42
|
on(master, "mv #{r10k_config_bak_path} #{r10k_config_path}")
|
@@ -45,7 +45,7 @@ teardown do
|
|
45
45
|
clean_up_r10k(master, last_commit, git_environments_path)
|
46
46
|
end
|
47
47
|
|
48
|
-
master.add_env_var('
|
48
|
+
master.add_env_var('HTTP_PROXY', proxy_env_value)
|
49
49
|
|
50
50
|
step 'Backup Current "r10k" Config'
|
51
51
|
on(master, "mv #{r10k_config_path} #{r10k_config_bak_path}")
|
@@ -3,6 +3,8 @@ require 'r10k_utils'
|
|
3
3
|
require 'master_manipulator'
|
4
4
|
test_name 'CODEMGMT-92 - C59234 - Single Git Source Using "SSH" Transport Protocol'
|
5
5
|
|
6
|
+
skip_test 'refactor to use shared private key internal to puppet'
|
7
|
+
|
6
8
|
#Init
|
7
9
|
env_path = on(master, puppet('config print environmentpath')).stdout.rstrip
|
8
10
|
git_control_remote = 'git@github.com:puppetlabs/codemgmt-92.git'
|
@@ -65,7 +65,12 @@ class R10K::Git::Rugged::BareRepository < R10K::Git::Rugged::BaseRepository
|
|
65
65
|
report_transfer(results, remote_name)
|
66
66
|
rescue Rugged::SshError, Rugged::NetworkError => e
|
67
67
|
restore_branches(backup_branches)
|
68
|
-
|
68
|
+
if e.message =~ /Unsupported proxy scheme for/
|
69
|
+
message = e.message + "As of curl ver 7.50.2, unsupported proxy schemes no longer fall back to HTTP."
|
70
|
+
else
|
71
|
+
message = e.message
|
72
|
+
end
|
73
|
+
raise R10K::Git::GitError.new(message, :git_dir => git_dir, :backtrace => e.backtrace)
|
69
74
|
rescue
|
70
75
|
restore_branches(backup_branches)
|
71
76
|
raise
|
@@ -73,8 +73,13 @@ class R10K::Git::Rugged::WorkingRepository < R10K::Git::Rugged::BaseRepository
|
|
73
73
|
force = !opts.has_key?(:force) || opts[:force]
|
74
74
|
|
75
75
|
with_repo do |repo|
|
76
|
-
|
77
|
-
|
76
|
+
# rugged/libgit2 will not update (at least) the execute bit a file if the SHA is already at
|
77
|
+
# the value being reset to, so this is now changed to an if ... else
|
78
|
+
if force
|
79
|
+
repo.reset(sha, :hard)
|
80
|
+
else
|
81
|
+
repo.checkout(sha)
|
82
|
+
end
|
78
83
|
end
|
79
84
|
end
|
80
85
|
|
data/lib/r10k/version.rb
CHANGED
@@ -19,4 +19,30 @@ describe R10K::Git::Rugged::WorkingRepository, :if => R10K::Features.available?(
|
|
19
19
|
}.to raise_error(R10K::Git::GitError, /Unable to check out unresolvable ref 'unresolvable'/)
|
20
20
|
end
|
21
21
|
end
|
22
|
+
|
23
|
+
context "checking out a specific SHA" do
|
24
|
+
let(:_rugged_repo) { double("Repository") }
|
25
|
+
|
26
|
+
before do
|
27
|
+
subject.clone(remote)
|
28
|
+
allow(subject).to receive(:with_repo).and_yield(_rugged_repo)
|
29
|
+
allow(subject).to receive(:resolve).and_return("157011a4eaa27f1202a9d94335ee4876b26d377e")
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "with force" do
|
33
|
+
it "does not receive a checkout call" do
|
34
|
+
expect(_rugged_repo).to_not receive(:checkout)
|
35
|
+
expect(_rugged_repo).to receive(:reset)
|
36
|
+
subject.checkout("157011a4eaa27f1202a9d94335ee4876b26d377e", {:force => true})
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe "without force" do
|
41
|
+
it "does receive a checkout call" do
|
42
|
+
expect(_rugged_repo).to receive(:checkout)
|
43
|
+
expect(_rugged_repo).to_not receive(:reset)
|
44
|
+
subject.checkout("157011a4eaa27f1202a9d94335ee4876b26d377e", {:force => false})
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
22
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r10k
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Thebo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|
@@ -180,6 +180,7 @@ files:
|
|
180
180
|
- CONTRIBUTING.mkd
|
181
181
|
- Gemfile
|
182
182
|
- LICENSE
|
183
|
+
- MAINTAINERS
|
183
184
|
- README.mkd
|
184
185
|
- Rakefile
|
185
186
|
- bin/r10k
|
@@ -243,8 +244,8 @@ files:
|
|
243
244
|
- integration/scripts/setup_r10k_env_ubuntu1004.sh
|
244
245
|
- integration/scripts/setup_r10k_env_ubuntu1204.sh
|
245
246
|
- integration/scripts/setup_r10k_env_ubuntu1404.sh
|
246
|
-
- integration/tests/Puppetfile/HTTPS_PROXY_effects_git_source.rb
|
247
247
|
- integration/tests/Puppetfile/HTTP_PROXY_effects_forge_source.rb
|
248
|
+
- integration/tests/Puppetfile/HTTP_PROXY_effects_git_source.rb
|
248
249
|
- integration/tests/README.mkd
|
249
250
|
- integration/tests/basic_functionality/install_pe_only_module_with_puppetfile.rb
|
250
251
|
- integration/tests/basic_functionality/negative/attempt_to_install_peonly_module_without_license.rb
|
@@ -262,7 +263,7 @@ files:
|
|
262
263
|
- integration/tests/command_line/negative/neg_invalid_cli_dep_flag.rb
|
263
264
|
- integration/tests/command_line/negative/neg_invalid_cli_env_flag.rb
|
264
265
|
- integration/tests/command_line/negative/neg_invalid_cmd_line_arg.rb
|
265
|
-
- integration/tests/git_source/
|
266
|
+
- integration/tests/git_source/HTTP_proxy_and_git_source.rb
|
266
267
|
- integration/tests/git_source/git_source_git.rb
|
267
268
|
- integration/tests/git_source/git_source_ssh.rb
|
268
269
|
- integration/tests/git_source/git_source_submodule.rb
|
@@ -537,7 +538,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
537
538
|
version: '0'
|
538
539
|
requirements: []
|
539
540
|
rubyforge_project:
|
540
|
-
rubygems_version: 2.5
|
541
|
+
rubygems_version: 2.2.5
|
541
542
|
signing_key:
|
542
543
|
specification_version: 4
|
543
544
|
summary: Puppet environment and module deployment
|