mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Remote multi-server automation tool
bin | ||
lib | ||
spec | ||
.gitignore | ||
capistrano.gemspec | ||
Gemfile | ||
LICENSE.txt | ||
Rakefile | ||
README.md |
Capistrano
wip - aim here is to get 'something' up and running
TODO:
-
harness rake for dsl
-
create a working capify equivalent
- create Capfile
- create lib/tasks/deploy
- create config/deploy/
- write config/deploy.rb with example configuration
-
basic configuration object
-
basic 'capistrano/deploy' noop example
-
don't care too much about testing at this point (rspec included for my reference)
-
before/after task hooks
-
handle multi stage
-
pass any necessary configuration from deploy.rb to SSHKit
-
is Capfile still legit? (although capfile/capfile.rb are already alternatives by default)
Installation
Add this line to your application's Gemfile:
gem 'capistrano' github: 'capistrano/capistrano', branch: :wip
And then execute:
$ bundle --binstubs
Capify:
$ cap install
This creates the following files:
Capfile
lib/deploy/tasks
config/deploy/staging.rb
config/deploy/production.rb
To create different stages:
$ cap install STAGES=local,sandbox,qa,production
Usage
$ cap -vT
$ cap staging deploy
$ cap production deploy
Tasks
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