check deploy key on CI side

This commit is contained in:
Abhay Rana 2015-08-23 00:39:11 +05:30
parent 656224e26e
commit cd728146e4
1 changed files with 8 additions and 9 deletions

View File

@ -24,21 +24,20 @@ set :rvm_path, "$HOME/.rvm/scripts/rvm"
# This task is the environment that is loaded for most commands, such as # This task is the environment that is loaded for most commands, such as
# `mina deploy` or `mina rake`. # `mina deploy` or `mina rake`.
task :environment do # Make sure that the deploy key is available
# If you're using rbenv, use this to load the rbenv environment. if ENV['CI'] === 'true'
# Be sure to commit your .ruby-version or .rbenv-version to your repository. `openssl aes-256-cbc -K $encrypted_82a37ece568a_key -iv $encrypted_82a37ece568a_iv -in deploy-rsa -out lightsaber-deploy -d`
invoke :'rvm:use[default]' `chmod 600 lightsaber-deploy`
end
# Make sure that the ssh key is available task :environment do
if ENV['CI'] === 'true' invoke :'rvm:use[default]'
queue "openssl aes-256-cbc -K $encrypted_82a37ece568a_key -iv $encrypted_82a37ece568a_iv -in deploy-rsa -out lightsaber-deploy -d"
queue "chmod 600 lightsaber-deploy"
end
end end
# Put any custom mkdir's in here for when `mina setup` is ran. # Put any custom mkdir's in here for when `mina setup` is ran.
# For Rails apps, we'll make some of the shared paths that are shared between # For Rails apps, we'll make some of the shared paths that are shared between
# all releases. # all releases.
desc "Starts the current release"
task :setup => :environment do task :setup => :environment do
queue "cd ~/lightsaber/current" queue "cd ~/lightsaber/current"
queue "bundle exec thin -C config.yml start" queue "bundle exec thin -C config.yml start"