README.md in shuttle-deploy-0.3.0.beta1 vs README.md in shuttle-deploy-0.3.0

- old
+ new

@@ -2,12 +2,14 @@ Shuttle is a minimalistic application deployment tool designed for small applications and one-server deployments. Configuration is stored as YAML-encoded file, no need to use ruby code. Operations are performed on SSH connection with target server. -![Build Status](https://magnum-ci.com/status/dea40dc3b6055d6a628a444149e2fead.png) +![Build Status](http://img.shields.io/travis/sosedoff/shuttle.svg?style=flat) +![Gem Version](http://img.shields.io/gem/v/shuttle-deploy.svg?style=flat) + ## Install Install from Rubygems: ``` @@ -24,10 +26,12 @@ - 1.8.7 - 1.9.2 - 1.9.3 - 2.0.0 +- 2.1.0 +- 2.1.2 ## Structure Deployment structure is very similar to capistrano. @@ -334,9 +338,43 @@ - `after_link_release` - After release has been linked - `before_rollback` - Before rollback operation - `after_rolback` - After rollback operation Each hook could include one or many bash commands. + +## Tasks + +Tasks are user-defined commands or a set of multiple commands that could be integrated +into hooks. The benefit of having tasks defined separate from the hooks is to +make deployment steps more readable. + +Here's an example a task: + +```yaml +tasks: + flush_cache: + - bundle exec cache:clear + + reset_counters: + - bundle exec counters:submit + - bundle exec counters:reset + +hooks: + before_link_release: + - task=flush_cache + - task=reset_counters +``` + +Tasks could only be invoked from a hook, invoking a task from within another task +does not work and intended to keep things simple. + +Commands in tasks are treated in the same way as commands in a hook, thus any failure +of a command within a hook that does not allow any failures will trigger a deployment +rollback. The only hook that allows failures is `after_link_release`, basically +release is already symlinked and if something goes wrong it will not affect anything. + +Tasks are also a great way to split up groups of steps into smaller, more logical +chunks. ## Rollback In case if you want to revert latest deploy, run: