Red Hat Bugzilla – Bug 862919
Don't assume Rakefile exists
Last modified: 2015-05-14 19:00:16 EDT
Description of problem:
If a Gemfile exists then our code assumes a Rakefile also exists, if it doesn't we error.
To reproduce create a Gemfile and Gemfile.lock but no Rakefile and git push. It will error here:
+ bundle exec rake assets:precompile
Build step 'Execute shell' marked build as failure
We should probably confirm that a Rakefile exists before trying to execute this command, if it doesn't exist, skip it.
build.sh scripts fixed in https://github.com/openshift/origin-server/pull/1003
Jenkins templates not updated, as extra code deemed too confusing.
Verified on devenv_2550
1. Create ruby-1.8/ruby-1.8 application
2. Create a Gemfile, add some contents and run bundle install(no Rakefile)
3. git push changes to remote
4. Create a Rakefile in app's repo, git push again
After step 3:
gem packages are installed during git push, the command "bundle exec rake assets:precompile" is not executed.
After step 4:
Command "Precompiling with 'bundle exec rake assets:precompile'" is executed when a Rakefile is present.