ops_tasks 0.5.6 → 0.5.7
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 +10 -7
- data/lib/ops_tasks/version.rb +1 -1
- data/ops_tasks.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3612d79a77ab0b1078e2a2062d45e0eb33267ffa
|
4
|
+
data.tar.gz: dcfae6d6eea8c8154e21295841db9e0ff461040f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb8c553474f5f232d713ab134f911fc08543442b0b59ee13bddbb987d36d63cbb39f868d6ac729224450a7f72e847bc4dbd994640ad4fe0493d65047dd1a297f
|
7
|
+
data.tar.gz: 41d6b4b95ce3b0378607e685af976c03a12d198cbbf4a00a6d60f1dd23ea7a1e35c3c6d751bfb14a052d1854db90292acc0f3ad5a8d8ff49ec5bba074b84fbef
|
data/lib/ops_tasks/deployment.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'say2slack'
|
2
2
|
require 'aws-sdk'
|
3
|
+
require 'shorturl'
|
3
4
|
|
4
5
|
module OpsTasks
|
5
6
|
class Deployment
|
@@ -72,9 +73,11 @@ module OpsTasks
|
|
72
73
|
end
|
73
74
|
|
74
75
|
def log_url(deployment_id)
|
75
|
-
@client.describe_commands(
|
76
|
+
deploy = @client.describe_commands(
|
76
77
|
:deployment_id => deployment_id
|
77
|
-
)[:
|
78
|
+
)[:commands].first
|
79
|
+
# p deploy
|
80
|
+
ShortURL.shorten deploy[:log_url]
|
78
81
|
end
|
79
82
|
|
80
83
|
|
@@ -103,15 +106,16 @@ module OpsTasks
|
|
103
106
|
end
|
104
107
|
|
105
108
|
def announce_log(id)
|
109
|
+
return "" if log_url(id).empty?
|
106
110
|
"Chef".
|
107
|
-
says("
|
111
|
+
says("log: #{URI.encode(log_url(id))}").
|
108
112
|
to_channel(@slack_channel)
|
109
|
-
puts log_url(id)
|
113
|
+
# puts log_url(id)
|
110
114
|
end
|
111
115
|
|
112
116
|
def poll_api_for_status(deployment_id, running_status = 'running')
|
113
117
|
sleep 1 until assess_status(deployment_id) != running_status
|
114
|
-
puts assess_status(deployment_id)
|
118
|
+
puts "#{assess_status(deployment_id)} (log: #{log_url(deployment_id)})"
|
115
119
|
end
|
116
120
|
|
117
121
|
def wait_for_completion(deployment_id, task="deployment")
|
@@ -119,8 +123,7 @@ module OpsTasks
|
|
119
123
|
announce_status(task, deployment_id)
|
120
124
|
poll_api_for_status(deployment_id)
|
121
125
|
announce_status(task, deployment_id)
|
122
|
-
|
123
|
-
Process.daemon if @run_in_background
|
126
|
+
# Process.daemon if @run_in_background
|
124
127
|
end
|
125
128
|
end
|
126
129
|
end
|
data/lib/ops_tasks/version.rb
CHANGED
data/ops_tasks.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ops_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Prokesch
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: shorturl
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1'
|
83
97
|
description: AWS Opsworks Rake & CLI Tasks for Deployment
|
84
98
|
email:
|
85
99
|
- nick@prokes.ch
|