Git Product home page Git Product logo

capistrano-rsync's People

Contributors

bladrak avatar csdougliss avatar cyb3rd4d avatar ezekg avatar gitter-badger avatar lweijl avatar moll avatar nairolfl avatar rande avatar webflo avatar wingrunr21 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

capistrano-rsync's Issues

Documentation should be clear

I noticed that although this is a recent fork of capistrano-rsync, the documentation seems to not have been updated much.

I'm trying to wrap my head around how this is working and since I don't know much about capistrano, it seems to be extra hard especially since the documentation provided does not provide a working system.

Please update the documentation so it produces a working example of:

  1. a local machine pulling from Git some branch
  2. tmp/deploy being rsync to remote server (server:/path/to/app/shared/deploy)
  3. a new release ready

With the current configuration in README, #1 and #3 are done, only if I manually do: rsync -a tmp/deploy server:/path/to/shared/. This is the whole point of using capistrano-rsync-* so I dunno why it doesn't do just that.

Configuring if checking out a revision or not

Hi there,

I am having trouble integrating capistrano-rsync in our deployment process. We sometimes want to deploy a tag and sometimes deploy a branch, both are supported and work well. But when we want to deploy a specific revision, there seems to be no simple way of doing this.

Looking at rsync.rb

rsync_target = lambda do
  target = !!fetch(:rsync_checkout_tag, false) ? "tags/#{fetch(:branch)}" : "origin/#{fetch(:branch)}"
  target
end

rsync_branch = lambda do
  branch = !!fetch(:rsync_checkout_tag, false) ? "tags/#{fetch(:branch)}" : fetch(:branch)
  branch
end

...

execute :git, :reset, '--quiet', '--hard', "#{rsync_target.call}"

Both the tags and origin statements are hardcoded, but for a revision this is where it breaks.

Hopefully the following example makes it more clear.

cd tmp/my-project/deploy && /usr/bin/env git reset --quiet --hard origin/1e7762bf60ab3694ec746d7f46623cb54278aacb

Should be something like this..

cd tmp/my-project/deploy && /usr/bin/env git reset --quiet --hard 1e7762bf60ab3694ec746d7f46623cb54278aacb

Is this a known issue or is there a fix I am overlooking?

Bypass clone stage?

I use jenkins to deploy and it fetches the repo already down to /var/lib/jenkins/workspace/my git repo/

Is there anyway to to bypass clone stage and use the files already there?

Use correct server port number for rsync

See this question on StackOverflow for a possible solution. Even if you have an alternate port set via Capistrano, it does not get set when rsync is executed, resulting in a failed deployment. Let me know if you need some help and I'll be happy to issue a pull request.

Example server,

server "192.168.1.1:2222", {
  # ...
}

Possible solution derived one of the StackOverflow answers:

"rsync -e 'ssh -p #{port}' user@remoteip:/path/to/files/ /local/path/"

NoMethodError: undefined method `name' for nil:NilClass

hello,

i'm interested by your module.i need to use rsync for deploy my symfony websites.
so i have installed the extension capistrano-rsync and capistrano-rsync-bladrak.

in two cases, i get this error :

cap aborted!
NoMethodError: undefined method `name' for nil:NilClass

Tasks: TOP => rsync:create_release => rsync:release => rsync => rsync:stage_done => rsync:stage => rsync:create_stage
(See full trace by running task with --trace)
The deploy has failed with an error: undefined method `name' for nil:NilClass.

do you known the solution for resolve this problem.
i thank you very much for your help.

Cannot deploy with :branch set to tag

IT fails with:

      02 git reset --quiet --hard origin/4.16.2
      02 fatal: ambiguous argument 'origin/4.16.2': unknown revision or path not in the working tree.
      02 Use '--' to separate paths from revisions, like this:
      02 'git <command> [<revision>...] -- [<file>...]'
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Command::Failed: git exit status: 32768
git stdout: Nothing written
git stderr: fatal: ambiguous argument 'origin/4.16.2': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Tasks: TOP => rsync:create_release => rsync:release => rsync => rsync:stage_done => rsync:stage
(See full trace by running task with --trace)
The deploy has failed with an error: git exit status: 32768
git stdout: Nothing written
git stderr: fatal: ambiguous argument 'origin/4.16.2': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.