aws-codedeploy-agent 0.0.1 → 0.0.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.
data/CHANGES.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
-
#
|
1
|
+
# 0.0.2
|
2
|
+
|
3
|
+
* Fix hanging deployment issue, where the server responds to a command
|
4
|
+
acknowledgement with 'Succeeded' or 'Failed' command status, by sending an
|
5
|
+
update back to the server to echo the command status and continue/unstick
|
6
|
+
the deployment. (panthomakos)
|
7
|
+
|
8
|
+
# 0.0.1
|
2
9
|
|
3
10
|
* Converted to a gem for easier installation and use. (panthomakos)
|
@@ -5,7 +5,7 @@ $:.push File.expand_path("../vendor/gems/process_manager/lib", __FILE__)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = 'aws-codedeploy-agent'
|
8
|
-
s.version = '0.0.
|
8
|
+
s.version = '0.0.2'
|
9
9
|
s.license = 'Apache-2.0'
|
10
10
|
s.summary = 'AWS CodeDeploy Agent'
|
11
11
|
s.description = 'CodeDeploy Agent is responsible for doing the actual work of deploying software on an individual EC2 instance.'
|
@@ -96,7 +96,17 @@ module InstanceAgent
|
|
96
96
|
:host_command_identifier => command.host_command_identifier)
|
97
97
|
status = output.command_status
|
98
98
|
log(:debug, "Command Status = #{status}")
|
99
|
-
|
99
|
+
|
100
|
+
if status == 'Succeeded' || status == 'Failed'
|
101
|
+
log(:debug, "Calling PutHostCommandComplete: \"#{status}\" ")
|
102
|
+
@deploy_control_client.put_host_command_complete(
|
103
|
+
:command_status => status,
|
104
|
+
:diagnostics => {:format => "JSON", :payload => gather_diagnostics_from_acknowledge(status)},
|
105
|
+
:host_command_identifier => command.host_command_identifier)
|
106
|
+
return false
|
107
|
+
end
|
108
|
+
|
109
|
+
return true
|
100
110
|
end
|
101
111
|
|
102
112
|
def get_deployment_specification(command)
|
@@ -141,6 +151,20 @@ module InstanceAgent
|
|
141
151
|
end
|
142
152
|
gather_diagnostics_from_script_error(script_error)
|
143
153
|
end
|
154
|
+
|
155
|
+
private
|
156
|
+
def gather_diagnostics_from_acknowledge(status)
|
157
|
+
begin
|
158
|
+
if status == 'Succeeded'
|
159
|
+
raise ScriptError.new(ScriptError::SUCCEEDED_CODE, "", ScriptLog.new), 'Succeeded'
|
160
|
+
else
|
161
|
+
raise ScriptError.new(ScriptError::UNKNOWN_ERROR_CODE, "", ScriptLog.new), 'Failed'
|
162
|
+
end
|
163
|
+
rescue ScriptError => e
|
164
|
+
script_error = e
|
165
|
+
end
|
166
|
+
gather_diagnostics_from_script_error(script_error)
|
167
|
+
end
|
144
168
|
end
|
145
169
|
end
|
146
170
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-codedeploy-agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|