Giter Site home page Giter Site logo

rake-plugin's Introduction

rake-plugin's People

Contributors

alanharder avatar bklang avatar calavera avatar daniel-beck avatar daniel-beck-bot avatar ndeloof avatar olivergondza avatar olivierdagenais avatar punkle avatar sanelson2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rake-plugin's Issues

FATAL: \bin\rake.bat doesn't exist

When used in configuration: Jenkins Master on Windows + Jenkins Slave on Linux, Rake plugin seems to not work as expected. Jenkins Console output: FATAL: \bin\rake.bat doesn't exist
Rake plugin version: 1.8.0

/Gemfile not found

Hi,

I'm getting a strange behavior when trying to build a rake step, this is the console output

    Capturing environment variables produced by 'rvm use 1.9.3'
    $ bash -c export
    $ bash -c "test -f ~/.rvm/scripts/rvm"
    [reid-functional-tests] $ bash -c " source ~/.rvm/scripts/rvm && rvm use --install --create 1.9.3 && export > rvm.env"
    Using /var/lib/jenkins/.rvm/gems/ruby-1.9.3-p448
    [reid-functional-tests] $ /var/lib/jenkins/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/gems/1.9.1/bin/rake cucumber BROWSER=headless /var/lib/jenkins/.rvm/rubies/ruby-1.9.3-p448/bin/ruby -S bundle exec cucumber --format pretty
    /Gemfile not found
    Build step 'Invoke Rake' marked build as failure
    Finished: FAILURE

if you notice, the not found Gemfile is related to "/", not into the working directory as expected to be found.

So, to weird issues, crazy workarounds, I put a copy of the projects Gemfile on root (/Gemfile) and it works.

OBS: I'm using RVM Plugin to set ruby environment.

Regards,
Pablo Ramírez

'rake spec' does not work with an RVM gemset

RSpec::Core::RakeTask runs specs by invoking ruby -S rspec. When I set up a build step to run 'rake spec' with an RVM-gemsetted Ruby, it correctly runs the rake executable in the gemset bin directory, but the RSpec rake task then fails with "No such file or directory -- rspec (LoadError)".

ruby -S rspec means "search in PATH for a script called rspec", so it looks like PATH isn't being set correctly? If I forcibly set the PATH (via the global Jenkins environment variable configuration) to include the gemset bin directory, then 'rake spec' works, but this is a Jenkins-wide setting so it defeats the point of being able to choose a Ruby per build step. I think RVM does normally set the PATH appropriately, so is it possible that rake-plugin is somehow not passing through the PATH?

The command output is as follows:

[workspace] $ /var/lib/jenkins/.rvm/gems/ruby-1.8.7-p334@dg/bin/rake spec
/var/lib/jenkins/.rvm/rubies/ruby-1.8.7-p334/bin/ruby -S rspec ./spec/deferrable_gratification/combinators/bind_spec.rb ./spec/deferrable_gratification/fluent_spec.rb ./spec/deferrable_gratification/default_deferrable_spec.rb ./spec/deferrable_gratification/bothback_spec.rb ./spec/deferrable_gratification/primitives_spec.rb ./spec/deferrable_gratification/deferrable_gratification_spec.rb ./spec/deferrable_gratification/combinators_spec.rb
(in /var/lib/jenkins/jobs/testins/workspace)
/var/lib/jenkins/.rvm/rubies/ruby-1.8.7-p334/bin/ruby: No such file or directory -- rspec (LoadError)
rake aborted!

I'm not an experienced Jenkins user, so please let me know if there's any other information I can provide to help troubleshoot this.

Support rbenv?

What would it take to support rbenv instead of rvm? Anything?

Is there REE support?

On my Jenkins server I have a Rails app that uses REE (using a gemset defined in a .rvmrc file). However, it never shows in the list of available Rake versions (specifically for wanting to run rake notes after a build).

Looking at some of the code, I did notice that it looks for Ruby executables called "ruby" and "jruby", only. Does this mean REE is not supported?

Does not work with MacRuby

The first problem is that all the binaries start with 'mac' instead (i.e. macrake instead of rake). With rvm the binaries get symlinks, but the plugin claims that it cannot find any ruby gems.

I made some symlinks myself and told the plugin to use the MacRuby.framework directly (like it does for the system ruby installation); then the plugin was able to find the proper rake binary, but it claimed that the proper gems were not installed.

I checked $GEM_HOME and $GEM_PATH and they are still set to my rvm default ruby and not being overridden.

Adding bundle exec

I installed Jenkins for the first time, so this might be my fault, but when I tried to get my tests running through this plugin, they kept failing because it wasn't installing the dependencies on my Gemfile. I ended up going back to executing the job through shell and used /usr/local/rvm/bin/rvm 1.9.2 exec bundle exec rake test.

I'd rather use the rake-plugin. Would it make sense to add a "Use bundle exec" option, or maybe do it automatically by default if a Gemfile is detected? I've looked into this a little, but I wanted to see if I was on the right path before spending any real time on it.

Rake Plugin does not properly discover available gemsets

I noticed that not all my available gemsets were appearing. After inspecting the source it looks like the code that detects whether a gemset is available tries to make sure that Rake is installed. This does make sense, except it misses that Rake is available if installed via the @global gemset for each installed Ruby. My workaround was to install rake into each gemset, but could it be modified to assume that rake is available if installed in @global?

Rake can be run on the wrong executor if concurrent builds are enabled

Rake can be scheduled on the wrong machine.

To reproduce:

  • Create a job with "Execute concurrent builds if necessary" enabled
  • Add build steps:
    • Shell build step: echo 'task(:default) { puts hostname; sleep 8 }' > Rakefile
    • A few rake build steps (e.g. 5) with all options as default
  • Ensure you have enough executors available, on different hosts, to run at least two instances of the job at once
  • Trigger the job several times
  • In the logs, observe that rake may switch between hosts during the build, as in the following example:
Started by user Rohan McGovern
Started by user Rohan McGovern
[EnvInject] - Loading node environment variables.
Building remotely on rmcgover-ws-02 (docker) in workspace /home/jenkins/workspace/rake test
[rake test] $ /bin/sh -xe /tmp/hudson1005075034362718171.sh
+ echo 'task(:default) { puts `hostname`; sleep 8 }'
[rake test] $ /usr/bin/rake
dd8166383c1d
[rake test] $ /usr/bin/rake
dd8166383c1d
[rake test] $ /usr/bin/rake
5ea60c3d5e02
[rake test] $ /usr/bin/rake
5ea60c3d5e02
[rake test] $ /usr/bin/rake
5ea60c3d5e02
[rake test] $ /usr/bin/rake
5ea60c3d5e02
Finished: SUCCESS

I'm not too familiar with Jenkins' APIs, but to me, this code in Rake.java looks suspicious:

    private Launcher getLastBuiltLauncher(AbstractBuild build, Launcher launcher, BuildListener listener) {
        AbstractProject project = build.getProject();
        Node lastBuiltOn = project.getLastBuiltOn();
        Launcher lastBuiltLauncher = launcher;
        if (lastBuiltOn != null) {
            lastBuiltLauncher = lastBuiltOn.createLauncher(listener);
        }

        return lastBuiltLauncher;
    }

... since the value of project.getLastBuiltOn() presumably can change during a build.

Gemsets not detected in Hudson with system-wide rvm

I'm not sure if this is an issue with system-wide rvm or if it's an issue with the latest version of rvm. I recently rebuilt my rvm install which also meant upgrading rvm. When I look in Hudson I see a list of all my Rubies (ie. ruby-1.8.7 as well as ruby-1.8.7@global). But what I do not see any longer are the other gemsets I have created.

I have confirmed that the gemsets appear and are useable when logged in as the Hudson user:

hudson@ci:src/adhearsion$ id
uid=102(hudson) gid=1001(hudson) groups=1001(hudson),102(rvm)
hudson@ci:src/adhearsion$ rvm gemset list

gemsets for ruby-1.8.7-p330 (found in /usr/local/rvm/gems/ruby-1.8.7-p330)
as21
as22
as23
global

hudson@ci:src/adhearsion$ rvm gemset use as23
Now using gemset 'as23'
hudson@ci:src/adhearsion$ rake
... normal rake output ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.