I have deploy via bitbucket pipelines, which is uses Capistrano for deploy release to server. But there is one problem, Capistrano is pulling actual version of branch, but i need to deploy not actual branch, but version from pipeline(this need for redeploy previous stable version). And because in pipeline is already needed version of files, i just need to disable pulling if its possible.
Used ruby bundle for deploy.
Ruby: 2.5.5
Capistrano 3.8.0
Part of deploy.rb configuration:
set :repo_url, 'git@bitbucket.org:user/repo.git'
set :deploy_via, :remote_cache
set :copy_exclude, [ '.git' ]
set :pty, true
Thanks.
I was tried to replace git command for disable git pull with command:
replace_git_pull() {
if [ $1 = "pull" ]; then
echo "Git pull is disabled, exit";
return 0;
fi;
$(which git) "$@";
}
alias git='replace_git_pull'
Locally its works, but its doesn't have affect to Capistrano deploy, seems like Capistrano not uses console for pulling.
Tried replace git:update command, - receive error.
Deployment tool was changed to Deployer (php) https://github.com/deployphp/deployer
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.