From 0f696afd56780250b3f2828b875fb7ea8e4ebe81 Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Fri, 12 Jun 2015 20:45:38 -0400 Subject: [PATCH] Fix asset generation in the workbench package. Make sure the build step will error out if asset generation fails for whatever reason. No issue # --- jenkins/run-build-packages.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jenkins/run-build-packages.sh b/jenkins/run-build-packages.sh index e6a89b4d77..2e797bfccd 100755 --- a/jenkins/run-build-packages.sh +++ b/jenkins/run-build-packages.sh @@ -632,8 +632,17 @@ fi # from the package - empty it instead. rm -rf $WORKSPACE/apps/workbench/tmp/* +# Set up application.yml so that asset precompilation works +\cp config/application.yml.example config/application.yml -f +sed -i 's/secret_token: ~/secret_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/' config/application.yml + RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile >/dev/null +if [[ "$?" != "0" ]]; then + echo "ERROR: Asset precompilation failed" + EXITCODE=1 +fi + cd $WORKSPACE/debs # This is the complete package with vendor/bundle included. -- 2.30.2