Created
April 16, 2010 22:57
-
-
Save albertoperdomo/369074 to your computer and use it in GitHub Desktop.
Sample rails rake task for continous integration and deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :ci do | |
task :copy_yml do | |
sh "cp #{Rails.root}/config/example_database.yml #{Rails.root}/config/database.yml" | |
end | |
desc "Prepare for CI and run entire test suite" | |
task :build do | |
Rake::Task['db:migrate'].invoke | |
Rake::Task['db:test:prepare'].invoke | |
Rake::Task['test:units'].invoke | |
Rake::Task['cucumber:ci'].invoke | |
end | |
task :deploy do | |
sh "cap staging deploy" | |
end | |
desc "Prepare for CI and run entire test suite" | |
task :run => ['ci:copy_yml', 'ci:build', 'ci:deploy'] do | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment