r10k 2.4.5 → 2.5.0
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/CHANGELOG.mkd +12 -30
- data/lib/r10k/git/rugged/bare_repository.rb +27 -7
- data/lib/r10k/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63ae184bd31860c410b82f60bdaba13629c4ae6e
|
4
|
+
data.tar.gz: 708bfd7a7f4ef35c41110b437d06bcbd87187dc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da91a8d786f1cfe7a6f403456c8c044d2e1801a918c8cf4f18fbb783f06a8ef108974795e94b652a3172d97876e13eea8a2beb7fc9bc75a09b3eed2aa8a58da1
|
7
|
+
data.tar.gz: 0ed3a7a5992a1cefbb6dd1dfd27df636fdc6c680757029892b4aa7101d20a8714b7f829ebdbe4fb10d546e07f3391f20ec1661869b3d6ef6838585826d0a52fa
|
data/CHANGELOG.mkd
CHANGED
@@ -1,40 +1,22 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
=========
|
3
3
|
|
4
|
-
2.
|
4
|
+
2.5.0
|
5
5
|
-----
|
6
6
|
|
7
|
-
2016/
|
8
|
-
|
9
|
-
(RK-78) Use :prune option for #fetch in Rugged::BareRepository
|
10
|
-
|
11
|
-
Versions of the "rugged" gem prior to 0.24.0 lacked the ability to automatically
|
12
|
-
"prune" branches from a local repo that no longer existed in the matching remote
|
13
|
-
repo after a fetch. To work around this issue, r10k included code that would
|
14
|
-
manually remove/recreate branches during a fetch. Since "rugged" 0.24.0 is now
|
15
|
-
widely available, r10k has been updated to use the built-in "prune" option
|
16
|
-
during a fetch and the workaround code has been removed.
|
17
|
-
|
18
|
-
NOTE: If you use the "rugged" gem with r10k, you will need to manually upgrade
|
19
|
-
it to a version >= 0.24.0 to take advantage of the new functionality. If you
|
20
|
-
are using a "rugged" version less than 0.24.0, r10k will now issue a warning
|
21
|
-
every time it fetches from a remote git repository.
|
22
|
-
|
23
|
-
2.4.4
|
24
|
-
-----
|
25
|
-
2016/11/16
|
7
|
+
2016/11/15
|
26
8
|
|
27
9
|
### Bug Fixes
|
28
10
|
|
29
|
-
(#669)
|
30
|
-
|
31
|
-
|
32
|
-
|
11
|
+
(#669) Updated the behavior of the rugged based git provider to handle
|
12
|
+
unexpected behavior around checkout and resets regarding file permissions,
|
13
|
+
specifically, when resetting to an already checked out SHA the executable bit
|
14
|
+
on files would not update.
|
33
15
|
|
34
16
|
### Changes
|
35
17
|
|
36
|
-
(#664)
|
37
|
-
|
18
|
+
(#664) Added to the proxy error message for changes made to libcurl which gave
|
19
|
+
new, surprising errors about unsupported proxy schemes.
|
38
20
|
|
39
21
|
2.4.3
|
40
22
|
-----
|
@@ -96,7 +78,7 @@ Puppetfile should be installed to. See the [Puppetfile documentation](https://gi
|
|
96
78
|
|
97
79
|
You can now configure how r10k purges unmanaged content after a deployment. The
|
98
80
|
default behavior should be unchanged but there is a new "purge\_levels" configuration
|
99
|
-
option that can be used to enable new behavior or de-activate certain existing
|
81
|
+
option that can be used to enable new behavior or de-activate certain existing
|
100
82
|
behaviors. See the relevant [configuration documentation](https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd#purge_levels) for more details.
|
101
83
|
|
102
84
|
(RK-223) Ability to track control repo branch from content declarations.
|
@@ -143,7 +125,7 @@ fix.)
|
|
143
125
|
Previously, r10k only supported the use of HTTP proxies for connecting to the Puppet
|
144
126
|
Forge. With these changes, r10k can now be configured to use an HTTP proxy for both
|
145
127
|
Forge and Git operations. Configuration can be specified globally, for Forge or Git
|
146
|
-
only, or on a per-Git repository basis. See [configuration documentation](https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd)
|
128
|
+
only, or on a per-Git repository basis. See [configuration documentation](https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd)
|
147
129
|
for more details.
|
148
130
|
|
149
131
|
### Bug Fixes
|
@@ -164,9 +146,9 @@ for SSH.
|
|
164
146
|
(RK-241) "deploy display" action does not properly format wrapped exceptions
|
165
147
|
|
166
148
|
The "deploy display" action was not capturing and logging exceptions in the same way as
|
167
|
-
other related actions. This meant that in many cases, when an error occurred, the
|
149
|
+
other related actions. This meant that in many cases, when an error occurred, the
|
168
150
|
underlying cause was not being shown. Specifically, the "deploy display" action was
|
169
|
-
not benefitting from the improved error messaging for unreadable SSH keys which was
|
151
|
+
not benefitting from the improved error messaging for unreadable SSH keys which was
|
170
152
|
added in r10k 2.2.0 as part of RK-220.
|
171
153
|
|
172
154
|
2.2.1
|
@@ -49,14 +49,9 @@ class R10K::Git::Rugged::BareRepository < R10K::Git::Rugged::BaseRepository
|
|
49
49
|
#
|
50
50
|
# @return [void]
|
51
51
|
def fetch(remote_name='origin')
|
52
|
+
backup_branches = wipe_branches
|
52
53
|
logger.debug1 { _("Fetching remote '%{remote_name}' at %{path}") % {remote_name: remote_name, path: @path } }
|
53
|
-
|
54
|
-
# Check to see if we have a version of Rugged that supports "fetch --prune" and warn if not
|
55
|
-
if defined?(Rugged::Version) && !Gem::Dependency.new('rugged', '>= 0.24.0').match?('rugged', Rugged::Version)
|
56
|
-
logger.warn { _("Rugged versions prior to 0.24.0 do not support pruning stale branches during fetch, please upgrade your \'rugged\' gem. (Current version is: %{version})") % {version: Rugged::Version} }
|
57
|
-
end
|
58
|
-
|
59
|
-
options = {:credentials => credentials, :prune => true}
|
54
|
+
options = {:credentials => credentials}
|
60
55
|
refspecs = ['+refs/*:refs/*']
|
61
56
|
|
62
57
|
remote = remotes[remote_name]
|
@@ -69,6 +64,7 @@ class R10K::Git::Rugged::BareRepository < R10K::Git::Rugged::BaseRepository
|
|
69
64
|
|
70
65
|
report_transfer(results, remote_name)
|
71
66
|
rescue Rugged::SshError, Rugged::NetworkError => e
|
67
|
+
restore_branches(backup_branches)
|
72
68
|
if e.message =~ /Unsupported proxy scheme for/
|
73
69
|
message = e.message + "As of curl ver 7.50.2, unsupported proxy schemes no longer fall back to HTTP."
|
74
70
|
else
|
@@ -76,10 +72,34 @@ class R10K::Git::Rugged::BareRepository < R10K::Git::Rugged::BaseRepository
|
|
76
72
|
end
|
77
73
|
raise R10K::Git::GitError.new(message, :git_dir => git_dir, :backtrace => e.backtrace)
|
78
74
|
rescue
|
75
|
+
restore_branches(backup_branches)
|
79
76
|
raise
|
80
77
|
end
|
81
78
|
|
82
79
|
def exist?
|
83
80
|
@path.exist?
|
84
81
|
end
|
82
|
+
|
83
|
+
def wipe_branches
|
84
|
+
backup_branches = {}
|
85
|
+
with_repo do |repo|
|
86
|
+
repo.branches.each do |branch|
|
87
|
+
if !branch.head?
|
88
|
+
backup_branches[branch.name] = branch.target_id
|
89
|
+
repo.branches.delete(branch)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
backup_branches
|
94
|
+
end
|
95
|
+
|
96
|
+
def restore_branches(backup_branches)
|
97
|
+
with_repo do |repo|
|
98
|
+
backup_branches.each_pair do |name, ref|
|
99
|
+
if !repo.branches.exist?(name)
|
100
|
+
repo.create_branch(name, ref)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
85
105
|
end
|
data/lib/r10k/version.rb
CHANGED
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
|
+
version: 2.5.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: 2016-
|
11
|
+
date: 2016-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|
@@ -538,7 +538,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
538
538
|
version: '0'
|
539
539
|
requirements: []
|
540
540
|
rubyforge_project:
|
541
|
-
rubygems_version: 2.5
|
541
|
+
rubygems_version: 2.2.5
|
542
542
|
signing_key:
|
543
543
|
specification_version: 4
|
544
544
|
summary: Puppet environment and module deployment
|