1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00
Commit graph

13 commits

Author SHA1 Message Date
Tom Clements
ae6a18456f Merge pull request #717 from capistrano/feature/no-release
Introduce `no_release` server option
2013-10-27 09:57:18 -07:00
seenmyfate
f056c0e4ec Merge branch 'master' into 3.1.x 2013-10-18 11:41:15 +01:00
seenmyfate
97d0ddf0ae Introduce no_release server option
In order to provide a way for a server to perform tasks as part of a
deploy but without being involved in the standard deploy flow, all
included tasks will now prefer `release_roles` over `roles`.  For
example:

    on release_roles :all do
      #
    end

This behaviour is implemented using `exclude`, a new option when
selecting roles.  `release_roles` is equivalent to:

    on roles :all, exclude: :no_release do
      #
    end

Any server defined with `no_release: true` will be excluded from these
tasks:

    server 'localhost', roles: %w{db}, no_release: true

`exclude` can also be used in user defined tasks against any attribute, for example:

    server 'localhost', roles: %w{app web}, inactive: true

    on roles :app, exclude: :inactive do
      #
    end

This commit resolves #686
2013-10-18 11:25:59 +01:00
Kir Shatrov
51d5d1ecd9 Warn developers that :all is a meta role
Fix for #705
2013-10-17 12:38:48 +02:00
seenmyfate
d8b9b695bb Allow configuration location to be configurable
This change allows both the `deploy_config_path` and `stage_config_path`
to be moved from the default locations of `config/deploy.rb` and
`config/deploy` respectively.  These values __must__ be set in the
`Capfile` prior to `capistrano/setup` being called, for example:

    set :deploy_config_path, 'app/config/deploy.rb'
    set :stage_config_path, 'app/config/deploy'

    # Load DSL and Setup Up Stages
    require 'capistrano/setup'

Fixes #610
2013-10-14 12:44:38 +01:00
seenmyfate
7eb7ca0124 Ensure release_path returns the correct value
`release_path` will now return the value of `current_path` by default.

Tasks that create a new release (i.e. `deploy`) now explicitly over-ride this
default with a new release path.  This change allows tasks that run in both
deploy and non-deploy contexts to use `release_path` to target the latest
 release when run in isolation, and the new release (before it is `current`)
when run as part of a deploy.
2013-08-10 19:31:03 +01:00
seenmyfate
ca81639e1d Match Hash implementation of fetch
An optional block can be passed to `fetch` that will be called in the
event that the variable is not set.

    fetch(:var) { fail 'var not found' }
2013-08-09 14:15:50 +01:00
Rafał Lisowski
e49733f3ef user can provide global ssh settings
for example in deploy.rb:

      {
         keys: %w(/home/user/.ssh/id_rsa),
         forward_agent: false,
         auth_methods: %w(publickey password)
      }
2013-07-11 17:38:55 +02:00
Lee Hambley
682ed3b2d0 Fix #542. Also revert issues introduced in c18029e. 2013-07-05 16:21:53 +02:00
seenmyfate
f5a585b3a4 Add integration tests for deploy task
This commit adds the outlines of a testing framework for Cap tasks.
Currently just the `cap install` and `cap deploy` tasks are covered. For
now, these tests can only be run if it is `ssh localhost` will work for
you and are currently excluded from the suite. It is my intention to
eventually replace the `sshkit` backend with a test backend, but for now
this is good enough to prevent simple regressions.
2013-06-16 13:08:15 +01:00
seenmyfate
2d4506a389 test sshkit is correctly configured 2013-06-14 10:02:59 +01:00
seenmyfate
9f3c95cc21 ensure role/server syntax examples are identical 2013-06-14 09:41:40 +01:00
seenmyfate
dbbf6d4b03 Add integration tests for DSL
These tests now document how to use the Capistrano DSL to set and fetch
hosts and variables using both `role` and `server` syntax
2013-06-02 12:30:11 +01:00