Re: [Cucumber] Setting up Jenkins to run Ruby + Cucumber...(can't get it to run cuke tests)

838 views
Skip to first unread message

Tim Walker

unread,
Oct 18, 2012, 5:56:52 PM10/18/12
to cu...@googlegroups.com
Hi, 
- cd to the folder where the .rvmrc lives
- bundle exec cucumber 
or
- write a rake task

My .02 anyway.

Thanks, 

Tim
On Thu, Oct 18, 2012 at 2:01 PM, telagraphic <telag...@gmail.com> wrote:
Hey,

Been trying to get Jenkins to run my cucumber tests to no avail.  I haven't found anything straightforward on implementing these two, except for this article, which isn't completely making sense to me.  Does anyone have a link or workflow to get Cucumber to run the tests in Jenkins.  It's sourcing my github repo, running my cucumber, but can't find the cucumber command or is running into gem dependency errors.  I know RVM is involved, but I'm not seeing how jenkins is running it.  I will take a look at the Jenkins forum too.

Tried many workarounds with gem fixes, path changes, but cant get cucumber to run.  No Fun!

Thanks in advance.  
Nick

--
-- Rules --
 
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
 
 

telagraphic

unread,
Oct 26, 2012, 9:17:19 AM10/26/12
to cu...@googlegroups.com
That confirms what I've read.  So thanks for the response!  

On Monday, October 22, 2012 7:58:12 PM UTC-4, Joel Byrnes wrote:
I've done this with little problem. It should not require hacks or fixes, but will require adding the location of your gems to the path. The first thing you should do is ensure you can run cucumber as the user that jenkins is running as. 

The article you linked looks good but it presumes you are already set up to run cucumber as the user which appears to be the problem. Obviously you are able to run them in some environment, such as your dev pc, so you did it once. 

Cheers
Joel

telagraphic

unread,
Oct 26, 2012, 9:18:11 AM10/26/12
to cu...@googlegroups.com
I just learned about the .rvmrc so that is a life saver!
Thanks for the tips.  I do appreciate the advice.

Everton Moreth

unread,
Nov 6, 2012, 5:11:25 PM11/6/12
to cu...@googlegroups.com
Jenkins already have a  RVM plugin, which automatically installs any ruby or gemset you need.

It also has a rake plugin, which detects your gemsets and loads rake gem from them, and then can run any rake tasks..

These 2 together solved my problem pretty easy. I actually have 18 rails apps deployed and CI'ed on jenkins.

Everton
--
Att,
Everton
http://www.evertonmoreth.com.br

Reply all
Reply to author
Forward
0 new messages