简体   繁体   中英

deploy specific revision and branch from git with capistrano

I am trying to deploy a specific revision to a server using Capistrano (we are trying to add a new server to the cluster and of course want it to have the same revision as the other machines). The issue seems to be that we are working on a branch. So, if we do:

cap production deploy:cold -S revision=bb88d26c4ec9e6c4fa132c63f79c8fdf8aa5aec4

it does:

* executing "git clone -q --depth 1 ssh://git@xxx.unfuddle.com/xxx/mc.git /u/apps/xxx/releases/20110407083545 && cd /u/apps/xxx/releases/20110407083545 && git checkout -q -b deploy bb88d26c4ec9e6c4fa132c63f79c8fdf8aa5aec4 && (echo bb88d26c4ec9e6c4fa132c63f79c8fdf8aa5aec4 > /u/apps/xxx/releases/20110407083545/REVISION)"

but we get:

** [new.server.com :: err] fatal: reference is not a tree: bb88d26c4ec9e6c4fa132c63f79c8fdf8aa5aec4

It seems to be ignoring the branch setting in the deploy.rb:

set :branch, "new_ui"

Could this be because of the multistage? Or something else interfering?

You usually get this error because you haven't pushed your repo up to your remote repo. You may only have a local branch called new_ui, but you're not tracking it remotely - so when you push, the branch is not reflected on your remote repo.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM