Bug 862919 - Don't assume Rakefile exists
Don't assume Rakefile exists
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jhon Honce
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-03 17:22 EDT by Mike McGrath
Modified: 2015-05-14 19:00 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-19 14:27:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike McGrath 2012-10-03 17:22:39 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.
Comment 1 Jhon Honce 2012-12-03 12:19:33 EST
build.sh scripts fixed in https://github.com/openshift/origin-server/pull/1003

Jenkins templates not updated, as extra code deemed too confusing.
Comment 2 Jianwei Hou 2012-12-03 21:48:45 EST
Verified on devenv_2550

Steps:
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

Result:
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.

Note You need to log in before you can comment on or make changes to this bug.