Bug 862919 - Don't assume Rakefile exists
Summary: Don't assume Rakefile exists
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-03 21:22 UTC by Mike McGrath
Modified: 2015-05-14 23:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-19 19:27:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike McGrath 2012-10-03 21:22:39 UTC
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 17:19:33 UTC
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-04 02:48:45 UTC
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.