Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reload the gemsets where rake is not found #15

Merged
merged 1 commit into from
Mar 13, 2014

Conversation

punkle
Copy link
Contributor

@punkle punkle commented Mar 10, 2014

  • With this change the rake version can be configured with a rake that does not get
    created until during the build via the rvm plugin. This deals with an issue which
    shows up when job configurations are created via the jenkins api.

-  With this change the rake version can be configured with a rake that does not get
   created until during the build via the rvm plugin. This deals with an issue which
   shows up when job configurations are created via the jenkins api.
@cloudbees-pull-request-builder

plugins » rake-plugin #3 SUCCESS
This pull request looks good

@olivierdagenais
Copy link
Member

Hi and thanks for the pull request!

Can you tell me how you tested this change? In other words, how do I reproduce the issue you mention, without your changes, and then, when I upgrade the plugin, how do I verify that it has been resolved?

Thanks!

  • Oli

@punkle
Copy link
Contributor Author

punkle commented Mar 10, 2014

Hey,

OK so to test do the following:

Setup (You can do these once)

  1. Install the rvm, ruby-runtime and token-macro plugins to jenkins
  2. Install rvm on the machine hosting jenkins https://rvm.io/
  3. Instal the ruby version ruby 1.9.3
    rvm install 1.9.3

Test (run this twice. Once pre my changes and once post my changes)

  1. Delete the existing gemset
    rvm gemset delete ruby-1.9.3-p484@new_gemset
  2. Use the jenkins api to create the following configuration
<?xml version='1.0' encoding='UTF-8'?>
<project>
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties/>
  <scm class="hudson.scm.NullSCM"/>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers class="vector"/>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <hudson.tasks.Shell>
      <command>echo &apos;task :walk_dog do p &quot;walking dog&quot; end&apos; &gt; Rakefile
rake --tasks</command>
    </hudson.tasks.Shell>
    <hudson.plugins.rake.Rake>
      <rakeInstallation>ruby-1.9.3-p484@new_gemset</rakeInstallation>
      <rakeFile></rakeFile>
      <rakeLibDir></rakeLibDir>
      <rakeWorkingDir></rakeWorkingDir>
      <tasks>walk_dog</tasks>
      <silent>false</silent>
    </hudson.plugins.rake.Rake>
  </builders>
  <publishers/>
  <buildWrappers>
    <ruby-proxy-object>
      <ruby-object ruby-class="Jenkins::Plugin::Proxies::BuildWrapper" pluginid="rvm">
        <pluginid pluginid="rvm" ruby-class="String">rvm</pluginid>
        <object ruby-class="RvmWrapper" pluginid="rvm">
          <impl pluginid="rvm" ruby-class="String">ruby-1.9.3-p484@new_gemset</impl>
        </object>
      </ruby-object>
    </ruby-proxy-object>
  </buildWrappers>
</project>

You will see that pre my fix the plugin is not recognising the gemset which is created by the rvm plugin. Post my fix, the rake plugin is recognising the new gemset.

I hope this is clear. If not please let me know.

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

olivierdagenais added a commit that referenced this pull request Mar 13, 2014
Reload the gemsets where rake is not found
@olivierdagenais olivierdagenais merged commit aaa85f6 into jenkinsci:master Mar 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants