shuttle-deploy 0.3.0.beta1 → 0.3.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/.travis.yml +9 -0
- data/README.md +39 -1
- data/lib/shuttle/version.rb +1 -1
- data/spec/target_spec.rb +1 -1
- data/spec/task_spec.rb +4 -4
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b4112af6d635cb4038808612be1c24d688bd7d8
|
4
|
+
data.tar.gz: 0670095e6b330219b74d21d49f455e0136a9e244
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b8128127b8f5350540c3e75eef813407c747527a3586b46b57fb0611b2bd9e8beaba254b3aac3ef6c901c676ebd31c1817096b440ae6362c02524f40a9a173b
|
7
|
+
data.tar.gz: c5fa59f52b38ec1842d5b57219ddddf3267f4c04deb985de1ebe702331f512e2f042a3b6575f22d431f4be99519470e6a29662ea99e65447c7be8aa6994037ef
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -4,7 +4,9 @@ Shuttle is a minimalistic application deployment tool designed for small applica
|
|
4
4
|
and one-server deployments. Configuration is stored as YAML-encoded file, no need to use ruby code.
|
5
5
|
Operations are performed on SSH connection with target server.
|
6
6
|
|
7
|
-

|
8
|
+
|
9
|
+

|
8
10
|
|
9
11
|
## Install
|
10
12
|
|
@@ -26,6 +28,8 @@ Supported ruby versions:
|
|
26
28
|
- 1.9.2
|
27
29
|
- 1.9.3
|
28
30
|
- 2.0.0
|
31
|
+
- 2.1.0
|
32
|
+
- 2.1.2
|
29
33
|
|
30
34
|
## Structure
|
31
35
|
|
@@ -337,6 +341,40 @@ List of all available hooks that you can use to run custom commands:
|
|
337
341
|
|
338
342
|
Each hook could include one or many bash commands.
|
339
343
|
|
344
|
+
## Tasks
|
345
|
+
|
346
|
+
Tasks are user-defined commands or a set of multiple commands that could be integrated
|
347
|
+
into hooks. The benefit of having tasks defined separate from the hooks is to
|
348
|
+
make deployment steps more readable.
|
349
|
+
|
350
|
+
Here's an example a task:
|
351
|
+
|
352
|
+
```yaml
|
353
|
+
tasks:
|
354
|
+
flush_cache:
|
355
|
+
- bundle exec cache:clear
|
356
|
+
|
357
|
+
reset_counters:
|
358
|
+
- bundle exec counters:submit
|
359
|
+
- bundle exec counters:reset
|
360
|
+
|
361
|
+
hooks:
|
362
|
+
before_link_release:
|
363
|
+
- task=flush_cache
|
364
|
+
- task=reset_counters
|
365
|
+
```
|
366
|
+
|
367
|
+
Tasks could only be invoked from a hook, invoking a task from within another task
|
368
|
+
does not work and intended to keep things simple.
|
369
|
+
|
370
|
+
Commands in tasks are treated in the same way as commands in a hook, thus any failure
|
371
|
+
of a command within a hook that does not allow any failures will trigger a deployment
|
372
|
+
rollback. The only hook that allows failures is `after_link_release`, basically
|
373
|
+
release is already symlinked and if something goes wrong it will not affect anything.
|
374
|
+
|
375
|
+
Tasks are also a great way to split up groups of steps into smaller, more logical
|
376
|
+
chunks.
|
377
|
+
|
340
378
|
## Rollback
|
341
379
|
|
342
380
|
In case if you want to revert latest deploy, run:
|
data/lib/shuttle/version.rb
CHANGED
data/spec/target_spec.rb
CHANGED
data/spec/task_spec.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe Shuttle::Task do
|
4
|
-
let(:config) { double(tasks
|
5
|
-
let(:deploy) { double(config
|
4
|
+
let(:config) { double(:tasks => tasks) }
|
5
|
+
let(:deploy) { double(:config => config) }
|
6
6
|
let(:task) { described_class.new(deploy, "foo") }
|
7
7
|
|
8
8
|
before do
|
@@ -23,7 +23,7 @@ describe Shuttle::Task do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
context "when task does not have commands" do
|
26
|
-
let(:tasks) { Hashr.new(foo
|
26
|
+
let(:tasks) { Hashr.new(:foo => []) }
|
27
27
|
|
28
28
|
before do
|
29
29
|
task.run
|
@@ -35,7 +35,7 @@ describe Shuttle::Task do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
context "when task has commands" do
|
38
|
-
let(:tasks) { Hashr.new(foo
|
38
|
+
let(:tasks) { Hashr.new(:foo => ["cmd1", "cmd2"]) }
|
39
39
|
|
40
40
|
before do
|
41
41
|
task.run
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shuttle-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Sosedoff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -160,6 +160,7 @@ extra_rdoc_files: []
|
|
160
160
|
files:
|
161
161
|
- ".gitignore"
|
162
162
|
- ".rspec"
|
163
|
+
- ".travis.yml"
|
163
164
|
- Gemfile
|
164
165
|
- LICENSE
|
165
166
|
- README.md
|
@@ -220,9 +221,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
220
221
|
version: '0'
|
221
222
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
223
|
requirements:
|
223
|
-
- - "
|
224
|
+
- - ">="
|
224
225
|
- !ruby/object:Gem::Version
|
225
|
-
version:
|
226
|
+
version: '0'
|
226
227
|
requirements: []
|
227
228
|
rubyforge_project:
|
228
229
|
rubygems_version: 2.2.2
|