ensl.org/lib/tasks/ci.rake
Luke Barratt d6ae95e18c Update travis config to cache bundler
Fallback to older rails I18n behaviour
Silence deprecation warnings, for now
Added code climate test reporter
Created CI deployment task
Added *all* the badges
2014-03-25 21:58:51 +00:00

22 lines
No EOL
549 B
Ruby

namespace :ci do
task :deploy do
require 'rubygems'
require 'capistrano/all'
require 'capistrano/setup'
require 'capistrano/deploy'
if ci_branch = ENV['TRAVIS_BRANCH']
BRANCH_MAP = {
# 'master' => 'production'
'develop' => 'staging'
}
if BRANCH_MAP.include?(ci_branch)
Capistrano::Application.invoke(BRANCH_MAP[ci_branch])
Capistrano::Application.invoke("deploy")
end
else
raise "Failed to deploy: Rake task called outside of CI environment"
end
end
end