diff options
Diffstat (limited to 'lib/tasks/ci.rake')
| -rw-r--r-- | lib/tasks/ci.rake | 14 | 
1 files changed, 11 insertions, 3 deletions
| 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" | 
