ops_tasks 0.5.8 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ops_tasks/deployment.rb +5 -5
- data/lib/ops_tasks/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: a038823d0481902dbc21a29286b83d9edf23474b
|
4
|
+
data.tar.gz: 1122544f0d12cd5bb570063f5af28affdcb5b296
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b06f4217b1216e832776975b0bb5bcf4795e59598ab54964a912cbb0b6df9baed8e01fb6049e1df077ec215328dd15c6dd0057bd8440ab6812fd2f80707191eb
|
7
|
+
data.tar.gz: 2c19ffb71a4b46bcc71335caf4d24819511c4b695413fc84f18b733b0b05e4f955fb5948b22e77139f3d8790410752cf0fb8a97ed203b3e6a0b9dbaca47d8f07
|
data/lib/ops_tasks/deployment.rb
CHANGED
@@ -89,11 +89,10 @@ module OpsTasks
|
|
89
89
|
# @client.describe_deployments(:deployment_ids => [deployment_id])[:deployments].first[:status]
|
90
90
|
# end
|
91
91
|
|
92
|
-
def announce_status(task, deployment_id
|
92
|
+
def announce_status(task, deployment_id)
|
93
93
|
return false if notifications_disabled?
|
94
|
-
log = "(log: #{log_url(deployment_id)})" unless log.empty?
|
95
94
|
status = assess_status(deployment_id)
|
96
|
-
"Chef".says("#{@project} #{task}
|
95
|
+
"Chef".says("#{@project} #{task} <#{log_url(deployment_id)}|#{status}>").to_channel(@slack_channel)
|
97
96
|
end
|
98
97
|
|
99
98
|
def assess_status(deployment_id)
|
@@ -116,8 +115,9 @@ module OpsTasks
|
|
116
115
|
|
117
116
|
def poll_api_for_status(deployment_id, running_status = 'running')
|
118
117
|
sleep 1 until assess_status(deployment_id) != running_status
|
119
|
-
|
120
|
-
puts
|
118
|
+
astatus = assess_status(deployment_id)
|
119
|
+
puts "#{astatus}"
|
120
|
+
`open #{log_url(deployment_id)}` if astatus == 'failed'
|
121
121
|
end
|
122
122
|
|
123
123
|
def wait_for_completion(deployment_id, task="deployment")
|
data/lib/ops_tasks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ops_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Prokesch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|