2013-02-01 09:19:14 +00:00
|
|
|
# Capistrano
|
|
|
|
|
2013-02-01 14:41:51 +00:00
|
|
|
wip - aim here is to get 'something' up and running
|
|
|
|
|
2013-02-01 15:32:18 +00:00
|
|
|
TODO:
|
2013-02-01 14:41:51 +00:00
|
|
|
|
2013-02-01 15:32:18 +00:00
|
|
|
- [x] harness rake for dsl
|
|
|
|
- [x] create a working capify equivalent
|
|
|
|
- [x] create Capfile
|
|
|
|
- [x] create lib/tasks/deploy
|
|
|
|
- [x] create config/deploy/
|
|
|
|
- [x] write config/deploy.rb with example configuration
|
2013-02-01 14:41:51 +00:00
|
|
|
|
2013-02-01 15:32:18 +00:00
|
|
|
- [x] basic configuration object
|
|
|
|
- [x] pass any necessary configuration from deploy.rb to SSHKit
|
|
|
|
- [x] basic 'capistrano/deploy' noop example
|
|
|
|
- [x] don't care too much about testing at this point (rspec included for my reference)
|
2013-02-01 14:41:51 +00:00
|
|
|
|
2013-02-08 09:15:10 +00:00
|
|
|
- [x] before/after task hooks
|
2013-02-01 15:32:18 +00:00
|
|
|
- [ ] consider requiring default tasks via configuration (strategy?) rather than Capfile
|
|
|
|
- [ ] write more default tasks
|
|
|
|
- [ ] handle multiple stage file generation
|
2013-02-01 09:19:14 +00:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
Add this line to your application's Gemfile:
|
|
|
|
|
2013-02-01 15:32:18 +00:00
|
|
|
gem 'capistrano' github: 'capistrano/capistrano', branch: :wip
|
2013-02-01 09:19:14 +00:00
|
|
|
|
|
|
|
And then execute:
|
|
|
|
|
|
|
|
$ bundle
|
|
|
|
|
2013-02-01 14:41:51 +00:00
|
|
|
Capify:
|
|
|
|
|
2013-02-01 15:32:18 +00:00
|
|
|
$ bundle exec cap install
|
2013-02-01 09:19:14 +00:00
|
|
|
|
2013-02-01 14:41:51 +00:00
|
|
|
## Usage
|
2013-02-01 09:19:14 +00:00
|
|
|
|
2013-02-01 14:41:51 +00:00
|
|
|
$ cap -vT
|
2013-02-01 09:19:14 +00:00
|
|
|
|
2013-02-01 14:41:51 +00:00
|
|
|
$ cap deploy
|
2013-02-08 09:15:10 +00:00
|
|
|
|
|
|
|
## Before / After
|
|
|
|
|
|
|
|
Where calling on the same task name, executed in order of inclusion
|
|
|
|
|
|
|
|
|
|
|
|
# call an existing task
|
|
|
|
before :starting, :ensure_user
|
|
|
|
|
|
|
|
after :finishing, :notify
|
|
|
|
|
|
|
|
|
|
|
|
# or define in block
|
|
|
|
before :starting, :ensure_user do
|
|
|
|
#
|
|
|
|
end
|
|
|
|
|
|
|
|
after :finishing, :notify do
|
|
|
|
#
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|