Re: WrapperContext incorrectly determining ruby class for rvm/rbenv

23 views
Skip to first unread message

Daniel Spilker

unread,
Nov 17, 2016, 2:41:36 AM11/17/16
to job-dsl...@googlegroups.com
I'm thinking about dropping support for the Ruby-based Plugins because those are becoming a compatibility problem.

Daniel


On Wed, Nov 16, 2016 at 6:21 PM, Jeff Bachtel <jeffrey...@stelligent.com> wrote:
In 1.51, a conditional check was put in for determining which ruby class to use for rvm and rbenv environments,

job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/wrapper/WrapperContext.groovy
class WrapperContext extends AbstractExtensibleContext {
   
private String getRubyWrapperClass() {
        jobManagement
.logPluginDeprecationWarning('ruby-runtime', '0.13')


        jobManagement
.isMinimumPluginVersionInstalled('ruby-runtime', '0.13') ? 'Jenkins::Tasks::BuildWrapperProxy' :
               
'Jenkins::Plugin::Proxies::BuildWrapper'
}

This was done because after people had updated to the new ruby-runtime, jobdsl was generating XML that could not be read correctly for the wrapper. I think this might be needing to check for 0.12 and newer however, as Jenkins::Tasks::BuildWrapperProxy is what is in the ruby-runtime tree for the 0.12 version:

jenkins.rb (detached*)$ git show 38736139607acf104c05e160cab8511f4efd2297
commit
38736139607acf104c05e160cab8511f4efd2297
Author: Yamashita Yuu <yamashita@geishatokyo.com>
Date:   Fri Jul 5 18:51:30 2013 +0900


   
[maven-release-plugin] prepare release ruby-runtime-parent-0.12


diff
--git a/java-runtime/pom.xml b/java-runtime/pom.xml
index a9d088d
..88ef9ab 100644
--- a/java-runtime/pom.xml
+++ b/java-runtime/pom.xml
@@ -3,7 +3,7 @@
   
<parent>
     
<groupId>org.jenkins-ci.plugins</groupId>
     <artifactId>ruby-runtime-parent</
artifactId>
-    <version>0.12-SNAPSHOT</version>
+    <version>0.12</
version>
   
</parent>


   <artifactId>ruby-runtime</
artifactId>
diff
--git a/pom.xml b/pom.xml
index
5de781f..e499922 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
   
</parent>


   <artifactId>ruby-runtime-parent</
artifactId>
-  <version>0.12-SNAPSHOT</version>
+  <version>0.12</
version>
   
<description>Hosts runtime for enabling pure-Ruby plugins</description>
   <packaging>pom</
packaging>

jenkins.rb (detached*)$ grep -r BuildWrapperProxy .
./ruby-runtime/lib/jenkins/tasks/build_wrapper_proxy.rb:  class BuildWrapperProxy < Java.hudson.tasks.BuildWrapper
./ruby-runtime/spec/jenkins/tasks/build_wrapper_proxy_spec.rb:describe Jenkins::Tasks::BuildWrapperProxy do
./ruby-runtime/spec/jenkins/tasks/build_wrapper_proxy_spec.rb:  subject {Jenkins::Tasks::BuildWrapperProxy}
./ruby-runtime/spec/jenkins/tasks/build_wrapper_proxy_spec.rb:    @wrapper = Jenkins::Tasks::BuildWrapperProxy.new(@plugin, @object)

I can definitely confirm that I'm generating jobs that aren't being picked up by Jenkins with the combination of JobDSL 1.53 and ruby-runtime 0.12

Thanks!

Jeff Bachtel

--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugin+unsubscribe@googlegroups.com.
To post to this group, send email to job-dsl-plugin@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/b502f0e1-d47c-4899-8820-cd2d6275863c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeff Bachtel

unread,
Nov 17, 2016, 9:57:47 AM11/17/16
to job-dsl-plugin
While I intensely dislike the fact, we use rvm all over our pipelines. It's definitely valuable to my teams to have ruby plugin support in job-dsl.

Although I certainly wish ruby-runtime 0.13 wasn't being silently broken.

Jeff
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.

Jeff Bachtel

unread,
Dec 12, 2016, 11:06:50 AM12/12/16
to job-dsl-plugin
Thread necromancy, but there's a PR out for this at https://github.com/jenkinsci/job-dsl-plugin/pull/965
Reply all
Reply to author
Forward
0 new messages