Fix asset generation in the workbench package. Make sure the build step will error...
authorWard Vandewege <ward@curoverse.com>
Sat, 13 Jun 2015 00:45:38 +0000 (20:45 -0400)
committerWard Vandewege <ward@curoverse.com>
Sat, 13 Jun 2015 00:45:38 +0000 (20:45 -0400)
No issue #

jenkins/run-build-packages.sh

index e6a89b4d772f73aeb5b1a66943f560be5ad050ca..2e797bfccd75229189b86aa32853bab38ec409b1 100755 (executable)
@@ -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.