diff options
| -rw-r--r-- | config/database/jenkins.yml | 8 | ||||
| -rw-r--r-- | lib/tasks/ci.rake | 21 |
2 files changed, 23 insertions, 6 deletions
diff --git a/config/database/jenkins.yml b/config/database/jenkins.yml new file mode 100644 index 000000000..8b7a8ef2f --- /dev/null +++ b/config/database/jenkins.yml @@ -0,0 +1,8 @@ +test: + adapter: postgis + encoding: unicode + schema_search_path: 'public,shared_extensions' + postgis_schema: 'shared_extensions' + username: <%= ENV['POSTGRESQL_ENV_POSTGRES_USER'] || 'jenkins' %> + password: <%= ENV['POSTGRESQL_ENV_POSTGRES_PASSWORD'] %> + database: stif_boiv_test diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index 092a4619f..b198a374a 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -1,11 +1,20 @@ namespace :ci do - task :db_travis_config do - cp "config/database.yml.travis", "config/database.yml" + desc "Prepare CI build" + task :setup do + cp "config/database/jenkins.yml", "config/database.yml" + sh "RAILS_ENV=test rake db:migrate" end - + + desc "Deploy after CI" task :deploy do - cp "chouette2.war", "/var/lib/tomcat6/webapps/" - end - task :build => [ "war", "ci:deploy"] + sh "cap dev deploy" + end + + desc "Clean test files" + task :clean do + sh "rm -rf log/test.log" + end end +desc "Run continuous integration tasks (spec, ...)" +task :ci => ["ci:setup", "spec", "ci:deploy", "ci:clean"] |
