diff options
| author | mo khan <mo@mokhan.ca> | 2013-06-05 21:09:02 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-06-05 21:09:02 -0600 |
| commit | 6d6748812e499ae1c386bb40b7c369ad84f881d4 (patch) | |
| tree | 4f8db2925fe8876753a1e26a9d1fb7c6210b4e76 /lib | |
| parent | f67690053401a16eb1d8f001ad931cdb62cb1e3d (diff) | |
create script to automatically deploy to staging after each good build
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/tasks/ci.rake | 9 | ||||
| -rw-r--r-- | lib/tasks/deployment.rake | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index 52f562c0..996a9374 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -1 +1,10 @@ task :ci => ['db:test:prepare', 'spec', 'jasmine:ci'] + +namespace :ci do + task :deploy_staging do + now = Time.now + sh "git tag -a 'staging-#{now.strftime('%Y-%m-%d')}-#{now.to_i}-jenkins-continuous-deployment' -m 'just push it'" + Rake::Task['deploy:staging'].invoke + end +end + diff --git a/lib/tasks/deployment.rake b/lib/tasks/deployment.rake index 24f5a7e6..1f8ae010 100644 --- a/lib/tasks/deployment.rake +++ b/lib/tasks/deployment.rake @@ -1,7 +1,8 @@ namespace :deploy do desc "deploy to staging server" - task :staging => :spec do + task :staging do sh "cap staging deploy:migrations" + sh "cap staging deploy:clean" sh "curl http://staging.cakeside.com/ > /dev/null" end @@ -16,3 +17,4 @@ namespace :deploy do sh "curl http://cakeside.com/ > /dev/null" end end + |
