Commit 04ead628
Changed files (3)
lib
tasks
lib/tasks/ci.rake
@@ -1,10 +1,13 @@
task :ci => ['db:migrate', '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
+ namespace :deploy do
+ task :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
+ task :production => ['deploy:production']
end
end
script/deploy-production.sh
@@ -0,0 +1,10 @@
+#!/bin/bash -x
+echo "load bashrc"
+source ~/.bashrc
+
+echo 'switch gemset'
+rvm use ruby-2.0.0-p195@cakeside --create
+
+echo 'bundle install'
+git checkout master
+bundle exec rake ci:deploy:production --trace
script/deploy-staging.sh
@@ -7,4 +7,4 @@ rvm use ruby-2.0.0-p195@cakeside --create
echo 'bundle install'
git checkout master
-bundle exec rake ci:deploy_staging --trace
+bundle exec rake ci:deploy:staging --trace