Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Passing parameters to Capistrano
- git clone johndoe@gitsrv.domain:app
- cd app
- git checkout r2s1
- desc "Parameter Testing"
- task :parameter do
- puts "Parameter test #{configuration[:branch]} #{configuration[:tag]}"
- end
- cap test:parameter -s branch=master -s tag=1.0.0
- desc "Parameter Testing"
- task :parameter do
- system("whoami", user)
- puts "Parameter test #{user} #{configuration[:branch]} #{configuration[:tag]}"
- end
- $ GIT_REPO="johndoe@gitsrv.domain:app" GIT_BRANCH="r2s1" cap testing
- #deploy.rb:
- task :testing, :roles => :app do
- puts ENV['GIT_REPO']
- puts ENV['GIT_BRANCH']
- end
- # deploy from git repo
- set :repository, "git@git.mygitserver.com:mygitrepo.git"
- # tells cap to use git
- set :scm, :git
- set :repository, "#{scm_user}@gitsrv.domain:app"
- set :scm_user, 'someuser'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement