rebuy_deployment 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +6 -14
  2. data/lib/rebuy_deployment/deploy.rb +29 -4
  3. metadata +27 -27
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- N2ZhZDdlZDBmNTQwNTIyOTA3Y2RlZGJjMWE2OWNmMTAxOWUyYWRlNQ==
5
- data.tar.gz: !binary |-
6
- YjAyM2I1MjU2N2E0ZDNjNWE5OTBlODQyMjcyMWRmOGM3YThiNWMyZg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- YTA1ZjE4Y2RkZWM5ZDUzNTg0ZThmYzYwYTE1ZjdkNDgzM2NiY2M1OTA4YWM2
10
- YTk3NzQxNGM2M2YyNjkyZmM1M2IyMjIwNjZmOTQ4ZDk2YjJhZDhhNGVmNDJl
11
- MGQ0Yjk2MzAwZDUyZmMyNTQ3ZmEyZWFiZDJmZGYxMWJlNDI3ZmQ=
12
- data.tar.gz: !binary |-
13
- MzczMGQ2MzhhNTc2MjNhZDExZGVlYzdiMzI4OTRkOWQ3MmRiOGIzMjVlNGU2
14
- YmQ2ZTkzM2IyNDNlNTg2NjBkM2Q0Mjg0NTBlZjdlODBiNjM3Mjg5MTU4Y2Rl
15
- ZDQxNTZlMDFiM2EzNzc4OWRkYmUwZDgxMmY3NThkM2EzYWQ0OTc=
2
+ SHA1:
3
+ metadata.gz: db298852f0a1727b1d7973b7cf17c11febf6099c
4
+ data.tar.gz: 9fc35a60512d58c621483129f5b2c8d2503652c7
5
+ SHA512:
6
+ metadata.gz: 50b44e456e72a83a1e290e0ec4384146741a2d1780ae872522fbae00463c889c52dd9aaedc87fb322e771724cd98f5353fa4dfd3fa02780835171b430d26780d
7
+ data.tar.gz: 379b8fd3423e78d51a414f373791fda8dde4b778c906035bdc8a0c6db5025c7ff05f878288bd7869b4dfb9494d53d41d98dc1f7c49bd2a9bba6242cfada47cd0
@@ -154,15 +154,40 @@ namespace :deploy do
154
154
  run "#{try_sudo} /etc/init.d/php-fpm reload"
155
155
  when "svc"
156
156
  if exists?(:svc_name)
157
- run "#{try_sudo} /usr/bin/svc -d /service/#{svc_name}"
158
- run "#{try_sudo} /usr/bin/svc -u /service/#{svc_name}"
157
+ run "#{try_sudo} /usr/bin/svc -t /service/#{svc_name}"
159
158
  else
160
- run "#{try_sudo} /usr/bin/svc -d /service/#{application}"
161
- run "#{try_sudo} /usr/bin/svc -u /service/#{application}"
159
+ run "#{try_sudo} /usr/bin/svc -t /service/#{application}"
162
160
  end
163
161
  end
164
162
  end
165
163
 
164
+ task :rolling_restart, :roles => :app, :except => { :no_release => true } do
165
+ unless exists?(:restart_type)
166
+ set :restart_type, 'php-fpm'
167
+ end
168
+
169
+ case "#{restart_type}"
170
+ when "php-fpm"
171
+ restart = "#{try_sudo} /etc/init.d/php-fpm reload"
172
+ when "svc"
173
+ if exists?(:svc_name)
174
+ restart = "#{try_sudo} /usr/bin/svc -t /service/#{svc_name}"
175
+ else
176
+ restart = "#{try_sudo} /usr/bin/svc -t /service/#{application}"
177
+ end
178
+ end
179
+
180
+ servers = find_servers_for_task(current_task)
181
+ servers_length = servers.size - 1
182
+
183
+ servers.each_with_index do |server, index|
184
+ run restart, :hosts => server.host
185
+ logger.info "Deployed on #{server.host}, will go to sleep!"
186
+
187
+ sleep(30) if index != servers_length
188
+ end
189
+ end
190
+
166
191
  task :new_relic, :roles => :web, :on_error => :continue do
167
192
  if exists?(:new_relic_api_key)
168
193
  run "curl -H 'x-api-key:#{new_relic_api_key}'
metadata CHANGED
@@ -1,134 +1,134 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rebuy_deployment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
- - Mike Roetgers
8
- - Daniel Freudenberger
9
- - Ullrich Pfefferlein
7
+ - reBuy reCommerce GmbH
10
8
  autorequire:
11
9
  bindir: bin
12
10
  cert_chain: []
13
- date: 2013-06-11 00:00:00.000000000 Z
11
+ date: 2014-05-13 00:00:00.000000000 Z
14
12
  dependencies:
15
13
  - !ruby/object:Gem::Dependency
16
14
  name: capistrano
17
15
  requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: 2.14.2
19
+ version: 2.15.4
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
23
  requirements:
26
- - - ! '>='
24
+ - - "~>"
27
25
  - !ruby/object:Gem::Version
28
- version: 2.14.2
26
+ version: 2.15.4
29
27
  - !ruby/object:Gem::Dependency
30
28
  name: railsless-deploy
31
29
  requirement: !ruby/object:Gem::Requirement
32
30
  requirements:
33
- - - ! '>='
31
+ - - ">="
34
32
  - !ruby/object:Gem::Version
35
33
  version: 1.0.2
36
34
  type: :runtime
37
35
  prerelease: false
38
36
  version_requirements: !ruby/object:Gem::Requirement
39
37
  requirements:
40
- - - ! '>='
38
+ - - ">="
41
39
  - !ruby/object:Gem::Version
42
40
  version: 1.0.2
43
41
  - !ruby/object:Gem::Dependency
44
42
  name: rake
45
43
  requirement: !ruby/object:Gem::Requirement
46
44
  requirements:
47
- - - ! '>='
45
+ - - ">="
48
46
  - !ruby/object:Gem::Version
49
47
  version: '0'
50
48
  type: :runtime
51
49
  prerelease: false
52
50
  version_requirements: !ruby/object:Gem::Requirement
53
51
  requirements:
54
- - - ! '>='
52
+ - - ">="
55
53
  - !ruby/object:Gem::Version
56
54
  version: '0'
57
55
  - !ruby/object:Gem::Dependency
58
56
  name: mail
59
57
  requirement: !ruby/object:Gem::Requirement
60
58
  requirements:
61
- - - ! '>='
59
+ - - ">="
62
60
  - !ruby/object:Gem::Version
63
61
  version: 2.4.4
64
62
  type: :runtime
65
63
  prerelease: false
66
64
  version_requirements: !ruby/object:Gem::Requirement
67
65
  requirements:
68
- - - ! '>='
66
+ - - ">="
69
67
  - !ruby/object:Gem::Version
70
68
  version: 2.4.4
71
69
  - !ruby/object:Gem::Dependency
72
70
  name: capistrano-campfire
73
71
  requirement: !ruby/object:Gem::Requirement
74
72
  requirements:
75
- - - ! '>='
73
+ - - ">="
76
74
  - !ruby/object:Gem::Version
77
75
  version: 0.2.0
78
76
  type: :runtime
79
77
  prerelease: false
80
78
  version_requirements: !ruby/object:Gem::Requirement
81
79
  requirements:
82
- - - ! '>='
80
+ - - ">="
83
81
  - !ruby/object:Gem::Version
84
82
  version: 0.2.0
85
83
  - !ruby/object:Gem::Dependency
86
84
  name: zookeeper
87
85
  requirement: !ruby/object:Gem::Requirement
88
86
  requirements:
89
- - - ! '>='
87
+ - - ">="
90
88
  - !ruby/object:Gem::Version
91
89
  version: '0'
92
90
  type: :runtime
93
91
  prerelease: false
94
92
  version_requirements: !ruby/object:Gem::Requirement
95
93
  requirements:
96
- - - ! '>='
94
+ - - ">="
97
95
  - !ruby/object:Gem::Version
98
96
  version: '0'
99
97
  - !ruby/object:Gem::Dependency
100
98
  name: zk
101
99
  requirement: !ruby/object:Gem::Requirement
102
100
  requirements:
103
- - - ! '>='
101
+ - - ">="
104
102
  - !ruby/object:Gem::Version
105
103
  version: 1.8.0
106
104
  type: :runtime
107
105
  prerelease: false
108
106
  version_requirements: !ruby/object:Gem::Requirement
109
107
  requirements:
110
- - - ! '>='
108
+ - - ">="
111
109
  - !ruby/object:Gem::Version
112
110
  version: 1.8.0
113
111
  - !ruby/object:Gem::Dependency
114
112
  name: json
115
113
  requirement: !ruby/object:Gem::Requirement
116
114
  requirements:
117
- - - ! '>='
115
+ - - ">="
118
116
  - !ruby/object:Gem::Version
119
117
  version: '0'
120
118
  type: :runtime
121
119
  prerelease: false
122
120
  version_requirements: !ruby/object:Gem::Requirement
123
121
  requirements:
124
- - - ! '>='
122
+ - - ">="
125
123
  - !ruby/object:Gem::Version
126
124
  version: '0'
127
125
  description: This gem offers deployment for all rebuy.de projects
128
126
  email:
129
- - m.roetgers@rebuy.de
130
127
  - df@rebuy.de
131
128
  - u.pfefferlein@rebuy.de
129
+ - b.haeuser@rebuy.de
130
+ - a.kleiber@rebuy.de
131
+ - it@rebuy.de
132
132
  executables: []
133
133
  extensions: []
134
134
  extra_rdoc_files: []
@@ -145,17 +145,17 @@ require_paths:
145
145
  - lib
146
146
  required_ruby_version: !ruby/object:Gem::Requirement
147
147
  requirements:
148
- - - ! '>='
148
+ - - ">="
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  requirements:
153
- - - ! '>='
153
+ - - ">="
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
157
  rubyforge_project:
158
- rubygems_version: 2.0.3
158
+ rubygems_version: 2.2.2
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: Capistrano deployment for rebuy.de projects