release_manager 0.5.0 → 0.5.2
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/.env +1 -1
- data/.gitignore +1 -0
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +1 -1
- data/lib/release_manager/cli/deploy_r10k_cli.rb +1 -0
- data/lib/release_manager/git/utilites.rb +5 -2
- data/lib/release_manager/r10k_deployer.rb +4 -0
- data/lib/release_manager/remote_release.rb +1 -1
- data/lib/release_manager/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 364942ebd85562ce0608b558d9b670bc298a9b4a
|
4
|
+
data.tar.gz: f2e2e0cefae600b7c16d7518c65ea4f5f4159f3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd0dd4f644d138ab707498fe7d689ff2c950d5b742023ff5ad9f5f9398d409c0b52ee86c5fea7c933a9610bac9f263fae1ebc0605b5a0cc7659dc3cc6aa7fd45
|
7
|
+
data.tar.gz: 515d6a43667012fd475baeea10989d3f83c6a15563eb9641b053b02550ed8b4ada0a8f4ea3234e22e1903a4d5e572f289e4b0c329d9af61d08e47ca9c659636d
|
data/.env
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Release Manager
|
2
2
|
## Unreleased
|
3
|
-
|
3
|
+
## 0.5.2
|
4
|
+
* Adds proper error handling when missing git author name and email with r10k-deploy
|
5
|
+
## 0.5.1
|
6
|
+
* Fixes missing error object when credentials are not present
|
7
|
+
* Fixes error when deploy-r10k is used and remote setting was not set
|
4
8
|
## 0.5.0
|
5
9
|
* Adds more error handling instead of stack dumps
|
6
10
|
* Updates gitlab gem to 4.2
|
data/Gemfile.lock
CHANGED
@@ -56,6 +56,7 @@ Summary: Deploys the source ref into the dest branch by diffing the two and appl
|
|
56
56
|
options[:puppetfile] = options[:puppetfile] || puppetfile_path
|
57
57
|
options[:src_ref] ||= ARGV[0]
|
58
58
|
options[:dest_ref] ||= ARGV[1]
|
59
|
+
options[:remote] = true
|
59
60
|
validate(options)
|
60
61
|
path = File.dirname(options[:puppetfile])
|
61
62
|
R10kDeployer.run(path, options)
|
@@ -199,12 +199,12 @@ module ReleaseManager
|
|
199
199
|
|
200
200
|
# @return [String] - the author name found in the config
|
201
201
|
def author_name
|
202
|
-
repo.config.get('user.name') || Rugged::Config.global.get('user.name')
|
202
|
+
repo.config.get('user.name') || Rugged::Config.global.get('user.name') || ENV['GIT_USER_NAME']
|
203
203
|
end
|
204
204
|
|
205
205
|
# @return [String] - the author email found in the config
|
206
206
|
def author_email
|
207
|
-
repo.config.get('user.email') || Rugged::Config.global.get('user.email')
|
207
|
+
repo.config.get('user.email') || Rugged::Config.global.get('user.email') || ENV['GIT_USER_EMAIL']
|
208
208
|
end
|
209
209
|
|
210
210
|
# @return [Hash] the author information used in a commit message
|
@@ -281,6 +281,9 @@ module ReleaseManager
|
|
281
281
|
|
282
282
|
# @param [String] message - the message you want in the commit
|
283
283
|
def create_commit(message)
|
284
|
+
unless author_name and author_email
|
285
|
+
raise GitError.new("Git username and email must be set, current: #{author.inspect}")
|
286
|
+
end
|
284
287
|
# get the index for this repository
|
285
288
|
repo.status { |file, status_data| logger.debug "#{file} has status: #{status_data.inspect}" }
|
286
289
|
index = repo.index
|
@@ -39,6 +39,9 @@ class R10kDeployer
|
|
39
39
|
deploy.check_requirements
|
40
40
|
deploy.logger.info "Deploying R10k-Control #{options[:dest_ref]} with version: #{options[:src_ref]}"
|
41
41
|
deploy.run
|
42
|
+
rescue GitError => e
|
43
|
+
deploy.logger.fatal(e.message)
|
44
|
+
code = 1
|
42
45
|
rescue Gitlab::Error::Forbidden => e
|
43
46
|
logger.fatal(e.message)
|
44
47
|
logger.fatal("You don't have access to modify the repository")
|
@@ -99,6 +102,7 @@ class R10kDeployer
|
|
99
102
|
control_repo.apply_patch(patchfile.path)
|
100
103
|
control_repo.add_all
|
101
104
|
end
|
105
|
+
# since we added everything locally we don't create a remote commit
|
102
106
|
successful_commit = control_repo.commit(message, nil, nil, false)
|
103
107
|
control_repo.push_branch('myfork', branch_name, true) if successful_commit
|
104
108
|
mr = control_repo.create_merge_request(control_repo.url, message, {
|
@@ -42,7 +42,7 @@ class RemoteRelease < Release
|
|
42
42
|
logger.fatal(e.message)
|
43
43
|
logger.fatal("This probably means the user attached to the token does not have access")
|
44
44
|
exit -1
|
45
|
-
rescue Gitlab::Error::MissingCredentials
|
45
|
+
rescue Gitlab::Error::MissingCredentials => e
|
46
46
|
logger.fatal(e.message)
|
47
47
|
exit -1
|
48
48
|
rescue Gitlab::Error::Forbidden => e
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: release_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Osman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gitlab
|