rake-stretcher 0.1.3 → 0.2.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/lib/rake/stretcher/tasks/stretcher.rake +8 -11
- data/lib/rake/stretcher/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: 11a3b8f7512240a4b1c0417aac769aadad3e4af8
|
|
4
|
+
data.tar.gz: eb9edf25616801d294f4d48c717b1bd3c172ddc9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: afadd04a14b7e6513f701d4f479b21cea4b5a6d03a132497b329f54f4fe05cfedfcff7c1cdf1d5846356a79ffc7329fcb0a8c4d3e6539e5410702e92749f1211
|
|
7
|
+
data.tar.gz: 22876832763adfaf0807d6956df667ff06c55ed976cdc1aa18fc906f56008455041dcddd0a63f4aceaf55cefefe6355d06321893dc5089b8ba88722bacead8f3
|
|
@@ -50,7 +50,7 @@ namespace :stretcher do
|
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
def environment
|
|
53
|
-
|
|
53
|
+
ENV['DEPLOY_ENV'] ||= config['environment']
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
def tarball_name
|
|
@@ -159,10 +159,11 @@ namespace :stretcher do
|
|
|
159
159
|
end
|
|
160
160
|
p tempfile_path
|
|
161
161
|
sh <<-EOC
|
|
162
|
-
mv #{tempfile_path} "#{local_tarball_path}/current/manifest_#{role}_#{environment}
|
|
162
|
+
mv #{tempfile_path} "#{local_tarball_path}/current/manifest_#{role}_#{environment}.yml"
|
|
163
163
|
EOC
|
|
164
164
|
sh <<-EOC
|
|
165
|
-
aws s3
|
|
165
|
+
aws s3 mv "#{manifest_path}/manifest_#{role}_#{environment}.yml" "#{manifest_path}/manifest_#{role}_#{environment}_rollback.yml"
|
|
166
|
+
aws s3 cp "#{local_tarball_path}/current/manifest_#{role}_#{environment}.yml" "#{manifest_path}/manifest_#{role}_#{environment}.yml"
|
|
166
167
|
EOC
|
|
167
168
|
end
|
|
168
169
|
end
|
|
@@ -170,11 +171,9 @@ namespace :stretcher do
|
|
|
170
171
|
desc "kick start consul event"
|
|
171
172
|
task :kick_start do
|
|
172
173
|
deploy_roles.each do |role|
|
|
173
|
-
|
|
174
|
-
current_manifest = o.chomp
|
|
175
|
-
puts "kick start -> #{current_manifest}"
|
|
174
|
+
puts "kick start -> manifest_#{role}_#{environment}.yml"
|
|
176
175
|
sh <<-EOC
|
|
177
|
-
curl -X PUT -d "#{manifest_path}
|
|
176
|
+
curl -X PUT -d "#{manifest_path}/manifest_#{role}_#{environment}.yml" http://#{consul_host}:8500/v1/event/fire/deploy_#{role}_#{environment}\?pretty
|
|
178
177
|
EOC
|
|
179
178
|
end
|
|
180
179
|
end
|
|
@@ -182,11 +181,9 @@ namespace :stretcher do
|
|
|
182
181
|
desc "rollback consul event"
|
|
183
182
|
task :rollback do
|
|
184
183
|
deploy_roles.each do |role|
|
|
185
|
-
|
|
186
|
-
current_manifest = o.chomp
|
|
187
|
-
puts "kick start -> #{current_manifest}"
|
|
184
|
+
puts "kick start -> manifest_#{role}_#{environment}_rollback.yml"
|
|
188
185
|
sh <<-EOC
|
|
189
|
-
curl -X PUT -d "#{manifest_path}
|
|
186
|
+
curl -X PUT -d "#{manifest_path}/manifest_#{role}_#{environment}_rollback.yml" http://#{consul_host}:8500/v1/event/fire/deploy_#{role}_#{environment}\?pretty
|
|
190
187
|
EOC
|
|
191
188
|
end
|
|
192
189
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rake-stretcher
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- tjinjin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-03-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|