• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • job-dsl-plugin, rvm-plugin
    • None
    • ubuntu14 ubuntu16 openjdk oraclejdk

      I found this regression on Ubuntu 14, OpenJDK 1.8, Jenkins 2.17. All the wrappers disappeared from all of my job where i used rvm.
      I tried to roll back Rvm plugin to 0.4, job-dsl to 1.47 and jenkins to 2.16.

      When nothing helped i installed fresh 2.7.2 and ran DSL there. Same problem, if one of wrappers is RVM - no wrappers are used in the job.
      Both times i checked the XML, and wrappers were there.
      If i define RVM in UI - everything is OK.

          [JENKINS-37422] No Wrappers if RVM is defined in Job DSL

          The problem is an incompatible change in the Ruby Runtime plugin (https://wiki.jenkins-ci.org/display/JENKINS/Ruby+Runtime+Plugin). You also need to downgrade that plugin.

          Daniel Spilker added a comment - The problem is an incompatible change in the Ruby Runtime plugin ( https://wiki.jenkins-ci.org/display/JENKINS/Ruby+Runtime+Plugin ). You also need to downgrade that plugin.

          Andrei Burd added a comment -

          Thanks daspilker, i missed this one.
          Ay idea why in the repository linked in https://wiki.jenkins-ci.org/display/JENKINS/Ruby+Runtime+Plugin the last release is 0.10?

          Andrei Burd added a comment - Thanks daspilker , i missed this one. Ay idea why in the repository linked in https://wiki.jenkins-ci.org/display/JENKINS/Ruby+Runtime+Plugin the last release is 0.10?

          Daniel Spilker added a comment - No, according to Artifactory version 0.13 has been uploaded by user eitoball . Maybe he has an idea. See https://repo.jenkins-ci.org/webapp/#/artifacts/browse/tree/General/releases/org/jenkins-ci/plugins/ruby-runtime/0.13/ruby-runtime-0.13.hpi

          Andrei Burd added a comment -

          to sum this up - i was able to make work again downgrading ruby-runtime-plugin to 0.12 and RVM to 0.4

          Andrei Burd added a comment - to sum this up - i was able to make work again downgrading ruby-runtime-plugin to 0.12 and RVM to 0.4

          Eito Katagiri added a comment -

          burdandrei Could you explain how to reproduce this error?

          As far as I know, changes in ruby-runtime 0.13 is updating jruby version. I didn't think that the changes made incompatibility...

          Eito Katagiri added a comment - burdandrei Could you explain how to reproduce this error? As far as I know, changes in ruby-runtime 0.13 is updating jruby version. I didn't think that the changes made incompatibility...

          Andrei Burd added a comment -

          Hi eitoball,
          I managed to reproduce it by installing fresh jenkins 2.7.2 rvm and job-dsl plugin.
          then add the following:

          freeStyleJob('rvmdslwrappers') {
            wrappers {
              timestamps()
              colorizeOutput()
              buildUserVars()
              rvm('ruby-2@project')
          
            }
          }
          

          Genarated job will not have any wrappers, but if you list the XML - they are there.

          Andrei Burd added a comment - Hi eitoball , I managed to reproduce it by installing fresh jenkins 2.7.2 rvm and job-dsl plugin. then add the following: freeStyleJob( 'rvmdslwrappers' ) { wrappers { timestamps() colorizeOutput() buildUserVars() rvm( 'ruby-2@project' ) } } Genarated job will not have any wrappers, but if you list the XML - they are there.

          Eito Katagiri added a comment -

          I submitted https://github.com/jenkinsci/job-dsl-plugin/pull/901 This PR should fix partially. You can use rvm-plugin 0.6, but need to use ruby-runtime 0.12 (0.13 is the latest).

          Eito Katagiri added a comment - I submitted https://github.com/jenkinsci/job-dsl-plugin/pull/901 This PR should fix partially. You can use rvm-plugin 0.6, but need to use ruby-runtime 0.12 (0.13 is the latest).

          Eito Katagiri added a comment -

          I also submitted https://github.com/jenkinsci/jruby-xstream/pull/2 If this PR is merged, and ruby-runtime plugin is changed to use merged version of jruby-xstream, this issue should be fixed.

          Eito Katagiri added a comment - I also submitted https://github.com/jenkinsci/jruby-xstream/pull/2 If this PR is merged, and ruby-runtime plugin is changed to use merged version of jruby-xstream, this issue should be fixed.

          Andrei Burd added a comment -

          Thanks eitoball, the change you made to DSL i tried locally, but it didn't helped me because of the lack of jruby part.
          Thanks for handeling it for both sides, let's try to sync their releases now =)
          BTW, Why Ruby runtime plugin is not in github?

          Andrei Burd added a comment - Thanks eitoball , the change you made to DSL i tried locally, but it didn't helped me because of the lack of jruby part. Thanks for handeling it for both sides, let's try to sync their releases now =) BTW, Why Ruby runtime plugin is not in github?

          Eito Katagiri added a comment -

          > BTW, Why Ruby runtime plugin is not in github?

          burdandrei It is https://github.com/jenkinsci/jenkins.rb , under java-runtime. I know that it is confusing... I dunno why.

          Eito Katagiri added a comment - > BTW, Why Ruby runtime plugin is not in github? burdandrei It is https://github.com/jenkinsci/jenkins.rb , under java-runtime. I know that it is confusing... I dunno why.

          This problem does not only apply to Job DSL, but for all users updating from ruby-runtime 0.12 to 0.13.

          To reproduce, install rvm-plugin 0.6 and ruby-runtime 0.12. Then create a test job and mark the "Run the build in a RVM-managed environment" checkbox. Now update to ruby-runtime 0.13 and open the test job config. The checkbox is not checked anymore. I would prefer to get this fixed in ruby-runtime so that all users will profit from the fix.

          I will not merge PR #897 because it will break compatibility for users who are still running ruby-runtime 0.12 or older.

          Daniel Spilker added a comment - This problem does not only apply to Job DSL, but for all users updating from ruby-runtime 0.12 to 0.13. To reproduce, install rvm-plugin 0.6 and ruby-runtime 0.12. Then create a test job and mark the "Run the build in a RVM-managed environment" checkbox. Now update to ruby-runtime 0.13 and open the test job config. The checkbox is not checked anymore. I would prefer to get this fixed in ruby-runtime so that all users will profit from the fix. I will not merge PR #897 because it will break compatibility for users who are still running ruby-runtime 0.12 or older.

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          docs/Migration.md
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/wrapper/WrapperContext.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/wrapper/WrapperContextSpec.groovy
          http://jenkins-ci.org/commit/job-dsl-plugin/8dc6921a7840e80184602bf2c7fe0d2be8198c40
          Log:
          fixed compatibility with Ruby Runtime Plugin

          [FIXED JENKINS-37422]

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md docs/Migration.md job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/wrapper/WrapperContext.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/wrapper/WrapperContextSpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/8dc6921a7840e80184602bf2c7fe0d2be8198c40 Log: fixed compatibility with Ruby Runtime Plugin [FIXED JENKINS-37422]

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          docs/Migration.md
          job-dsl-api-viewer/src/assets/javascripts/App.js
          job-dsl-api-viewer/src/assets/javascripts/Dsl.js
          job-dsl-api-viewer/src/assets/javascripts/Settings.js
          job-dsl-api-viewer/src/assets/javascripts/templates/detail.hbs
          job-dsl-api-viewer/src/assets/javascripts/views/HomeView.js
          job-dsl-api-viewer/src/assets/javascripts/views/TreeView.js
          job-dsl-api-viewer/src/assets/stylesheets/main.less
          job-dsl-core/src/ast/groovy/javaposse/jobdsl/dsl/transform/PluginASTTransformation.groovy
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/RequiresPlugins.java
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/doc/ApiDocGenerator.groovy
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/wrapper/WrapperContext.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/PluginASTTransformationSpec.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/wrapper/WrapperContextSpec.groovy
          http://jenkins-ci.org/commit/job-dsl-plugin/b7d9b8084580b74363e50df9bbfb5dc2f4ca3f3e
          Log:
          Merge pull request #906 from daspilker/JENKINS-37422

          JENKINS-37422 fixed compatibility with Ruby Runtime Plugin

          Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/496b7eb078c7...b7d9b8084580

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md docs/Migration.md job-dsl-api-viewer/src/assets/javascripts/App.js job-dsl-api-viewer/src/assets/javascripts/Dsl.js job-dsl-api-viewer/src/assets/javascripts/Settings.js job-dsl-api-viewer/src/assets/javascripts/templates/detail.hbs job-dsl-api-viewer/src/assets/javascripts/views/HomeView.js job-dsl-api-viewer/src/assets/javascripts/views/TreeView.js job-dsl-api-viewer/src/assets/stylesheets/main.less job-dsl-core/src/ast/groovy/javaposse/jobdsl/dsl/transform/PluginASTTransformation.groovy job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/RequiresPlugins.java job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/doc/ApiDocGenerator.groovy job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/wrapper/WrapperContext.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/PluginASTTransformationSpec.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/wrapper/WrapperContextSpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/b7d9b8084580b74363e50df9bbfb5dc2f4ca3f3e Log: Merge pull request #906 from daspilker/ JENKINS-37422 JENKINS-37422 fixed compatibility with Ruby Runtime Plugin Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/496b7eb078c7...b7d9b8084580

          ruby-runtime 0.13 seems to be broken, any ruby-runtime based config does not survive a restart.

          Daniel Spilker added a comment - ruby-runtime 0.13 seems to be broken, any ruby-runtime based config does not survive a restart.

          It took a long time to figure out why I kept losing my configuration. After downgrading to 0.12 it worked again.

          Christiaan de Die le Clercq added a comment - It took a long time to figure out why I kept losing my configuration. After downgrading to 0.12 it worked again.

          This should work now with ruby-runtime 0.12 and job-dsl 1.57. ruby-runtime 0.13 is no longer available in the Update Center.

          Daniel Spilker added a comment - This should work now with ruby-runtime 0.12 and job-dsl 1.57. ruby-runtime 0.13 is no longer available in the Update Center.

            daspilker Daniel Spilker
            burdandrei Andrei Burd
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: