Search code examples
rubydeploymentcapistrano

Custom stage directory with Capistrano


How to change the default loading stage directory deploy/{mystage}.rb to something like ../../mystages/{mystage}.rb

with the multistage extension ?

set :stages, %w(stage1 stage2)

Solution

  • Usually, you'll define custom stages, as you quoted, with

    set :stages, %w(stage1 stage2)
    

    Capistrano will expect to find stage1.rb and stage2.rb under deploy/

    However, it looks like an additional directive (stage_dir) was merged, see the commit here