diff options
| author | Alban Peignier | 2018-05-13 19:56:48 +0200 |
|---|---|---|
| committer | Alban Peignier | 2018-05-13 19:56:48 +0200 |
| commit | 62857d2779a62967feaa307ea50f87218d8a82f8 (patch) | |
| tree | f69dc8003819be924d444ef94f84d9f960c940d9 | |
| parent | e5d1a53468aa3e28ee446c02af9433733c417c95 (diff) | |
| download | chouette-core-62857d2779a62967feaa307ea50f87218d8a82f8.tar.bz2 | |
Add ci:fix_webpacker task to prevent yarn launch. Refs #6996. Refs #5802
| -rw-r--r-- | lib/tasks/ci.rake | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index e31017b5a..7ef867b71 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -14,8 +14,14 @@ namespace :ci do desc "Prepare CI build" task :setup do - # FIXME remove this specific behavior + unless ENV["IGNORE_YARN_INSTALL"] + # FIXME remove this specific behavior + # Managed by Dockerfile.build + sh "yarn --frozen-lockfile install" + end + unless ENV["KEEP_DATABASE_CONFIG"] + # FIXME remove this specific behavior cp "config/database.yml", "config/database.yml.orig" cp "config/database/ci.yml", "config/database.yml" end @@ -28,6 +34,15 @@ namespace :ci do end end + task :fix_webpacker do + # Redefine webpacker:yarn_install to avoid --production + # in CI process + Rake::Task["webpacker:yarn_install"].clear + Rake::Task.define_task "webpacker:yarn_install" do + puts "Don't run yarn" + end + end + def git_branch if ENV['GIT_BRANCH'] =~ %r{/(.*)$} $1 @@ -55,7 +70,7 @@ namespace :ci do end task :assets do - sh "RAILS_ENV=test bundle exec rake assets:precompile i18n:js:export" + sh "RAILS_ENV=test bundle exec rake ci:fix_webpacker assets:precompile i18n:js:export" end task :jest do |
