Actually log webpack errors in compile_assets

closes: CNVS-37098

this should get rid of all of those cases where jenkins fails with
an error from webpack but everything works locally for a dev and they
have no idea why it is failing on jenkins

Test plan:
* look at the output of 
  http://jenkins.instructure.com/job/canvas__selenium/13893/console
  (which is based on this) and verify that it prints an error message
  of actually why webpack failed

Change-Id: I49581a8b77b0f563ff88ceb5c54ed24a23d7def9
Reviewed-on: https://gerrit.instructure.com/112813
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
This commit is contained in:
Ryan Shaw 2017-05-23 11:51:03 -06:00
parent 3dd16484e6
commit ed415c5a4e
1 changed files with 2 additions and 2 deletions

View File

@ -38,10 +38,10 @@ namespace :js do
task :webpack do
if ENV['RAILS_ENV'] == 'production' || ENV['USE_OPTIMIZED_JS'] == 'true' || ENV['USE_OPTIMIZED_JS'] == 'True'
puts "--> Building PRODUCTION webpack bundles"
`npm run webpack-production`
system "npm run webpack-production"
else
puts "--> Building DEVELOPMENT webpack bundles"
`npm run webpack-development`
system "npm run webpack-development"
end
raise "Error running js:webpack: \nABORTING" if $?.exitstatus != 0
end