Capistrano 3 copy strategy equivalent

后端 未结 3 1184
醉酒成梦
醉酒成梦 2021-02-20 16:25

I updated to Cap 3 and it appears that set :deploy_via, :copy is no longer supported. In the release annoucement there is a link to a video for replicating the copy

相关标签:
3条回答
  • 2021-02-20 16:42

    I ran into the same issue and posted a similar question on the capistrano google group.

    See here: https://groups.google.com/forum/#!topic/capistrano/BRa4Vj1_mEo

    Short answer: Write your own rake task.

    The capistrano maintainer provided some example code, via a blog post on his website, that can be found here: http://lee.hambley.name/2013/06/11/using-capistrano-v3-with-chef.html

    In the end, we've decided to go w/ a different strategy entirely, and implement a mirror repository on the same network as our servers.

    0 讨论(0)
  • 2021-02-20 16:47

    There is one work in the exact same way

    https://github.com/xuwupeng2000/capsitrano-scm-gitcopy

    Capistrano 3 :copy

    A copy strategy for Capistrano 3, which mimics the :copy scm of Capistrano 2. This Gem is inspired by and based on https://github.com/wercker/capistrano-scm-copy. Thank wercker so much.

    This will make Capistrano tar the a specific git branch, upload it to the server(s) and then extract it in the release directory.

    Usage

    cap uat deploy -s branch=(your release branch)

    0 讨论(0)
  • 2021-02-20 16:53

    You can use its gem - https://github.com/WildZero/capistrano-scm-tar-copy

    set:

    set :scm, :copy

    set :include_dir, '/User/w1ldzer0/ExampleDir'

    and go

    0 讨论(0)
提交回复
热议问题