diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/stif/reflex_synchronization.rb | 2 | ||||
| -rw-r--r-- | lib/tasks/ci.rake | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/stif/reflex_synchronization.rb b/lib/stif/reflex_synchronization.rb index b3f474221..a3bf3957e 100644 --- a/lib/stif/reflex_synchronization.rb +++ b/lib/stif/reflex_synchronization.rb @@ -38,7 +38,7 @@ module Stif if object.valid? object.save else - Rails.logger.error "Reflex:sync - #{object.class.model_name} with objectid #{object.objectid} and name #{object.name} can't be saved" + Rails.logger.error "Reflex:sync - #{object.class.model_name} with objectid #{object.objectid} can't be saved - errors : #{object.errors.messages}" end end diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index 90e47560e..7fe289ed6 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -2,7 +2,7 @@ namespace :ci do desc "Prepare CI build" task :setup do cp "config/database/jenkins.yml", "config/database.yml" - sh "RAILS_ENV=test rake db:migrate" + sh "RAILS_ENV=test rake db:drop db:create db:migrate" sh "npm --production --no-progress install" end @@ -19,7 +19,11 @@ namespace :ci do end def deploy_env - git_branch.in?(deploy_envs) ? git_branch : "dev" + if git_branch == "master" + "dev" + elsif git_branch.in?(deploy_envs) + git_branch + end end desc "Check security aspects" @@ -37,7 +41,11 @@ namespace :ci do desc "Deploy after CI" task :deploy do - sh "cap #{deploy_env} deploy:migrations" + if deploy_env + sh "cap #{deploy_env} deploy:migrations" + else + puts "No deploy for branch #{git_branch}" + end end desc "Clean test files" |
