Capistrano 1.1.9 (beta)

A new release of Capistrano is nearly upon us! Before I unleash it upon the world, though, I’d like to have a few brave souls put it through its paces, so I’m doing a brief run of it as a pre-release. You can grab it from the Rails beta gem server:

gem install -s http://gems.rubyonrails.com capistrano

There are a lot of changes in this release, most of them minor or cosmetic. However, there are some changes that may bite you, too.

The most significant change that may affect you has to do with the roles used for the setup, update_code, rollback_code, and symlink tasks. These tasks have changed such that they now deploy to all defined servers. That’s right, if you’ve got a server associated with any role, those tasks will deploy to that server. However, a server can explicitly opt out of being part of release deployment by setting :no_release => true in its role definition:

   role :file, "file-server.somewhere.example",
        :no_release => true

Take note of that! If you have any servers using non-standard roles (any role besides web, app, or db), you need to explicitly add :no_release => true in their role definitions, or your next deploy will target those servers, too.

Other significant changes that may or may not tickle you:

  • The -r/--recipe command line option is deprecated. You should use -f/--file instead.
  • Matthew Elder has contributed (and agreed to maintain) a module for the Mercurial SCM.
  • If you have sudo in a non-standard location, you can specify the path to sudo via the :sudo variable
  • Added :svn_passphrase so you can use keys with passphrases
  • Fixed missing default for :local in the CVS module
  • Subversion SCM accepts HTTPS certificates now
  • Work with pid-based setups (new spawner/reaper)
  • Added update task
  • Added :except on task declarations (as the opposite of :only)
  • Override the hosts to be used for a task via the HOSTS environment variable
  • Override the roles that will be used for a task via the ROLES environment variable
  • Added :hosts option on task declarations for defining tasks that work only on specific machines (rather than by role)
  • Don’t require a capfile (this allows you to use capistrano to operate on arbitrary hosts, all from the command line)

Various other changes have been made as well—you can look at the CHANGELOG for a complete list.

blog comments powered by Disqus