1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00
Remote multi-server automation tool
Find a file
2013-06-10 14:18:35 +02:00
bin Adds a stub executable with a warning about the API incompatibility 2013-05-28 17:05:30 +02:00
lib Updating the sample file, I'd like to ship implementations of these at launch time 2013-06-10 14:18:34 +02:00
spec Add integration tests for DSL 2013-06-02 12:30:11 +01:00
.gitignore Ignore the _site directory 2013-06-10 14:18:35 +02:00
capistrano.gemspec Force a newer version of SSHKit 2013-04-01 14:44:11 +02:00
Gemfile initial commit 2013-02-01 09:19:14 +00:00
LICENSE.txt initial commit 2013-02-01 09:19:14 +00:00
Rakefile add default rake task for travis 2013-02-08 09:20:23 +00:00
README.md Add Requirements to README 2013-06-07 17:45:39 +02:00

Capistrano Build Status

Requirements

Ruby 2.0

Installation

Add this line to your application's Gemfile:

gem 'capistrano', github: 'capistrano/capistrano', branch: :v3

And then execute:

$ bundle --binstubs

Capify:

$ cap install

This creates the following files:

├── Capfile
├── config
│   ├── deploy
│   │   ├── production.rb
│   │   └── staging.rb
│   └── deploy.rb
└── lib
    └── capistrano
            └── tasks

To create different stages:

$ cap install STAGES=local,sandbox,qa,production

Usage

$ cap -vT

$ cap staging deploy
$ cap production deploy

$ cap production deploy --dry-run
$ cap production deploy --prereqs
$ cap production deploy --trace

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

Console

Execute arbitrary remote commands, to use this simply add require 'capistrano/console' which will add the necessary tasks to your environment:

$ cap staging console

Configuration

SSHKit