timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-37771] "Run the build in a RVM-managed environment" field gets unchecked after restarting the Jenkins server. #3483

Closed timja closed 7 years ago

timja commented 8 years ago

Environment:
1 jenkins server with multiple slaves
all jobs affected by this are executed by the same slave.
All the jobs that have been configured to use the plugin and use the "Run the build in a RVM-managed environment" option, after restarting the jenkins, lose this setting.
The "Run the build in a RVM-managed environment" check box is unchecked after server restart.

using RVM plugin 0.6


Originally reported by mvardi, imported from: "Run the build in a RVM-managed environment" field gets unchecked after restarting the Jenkins server.
  • assignee: daspilker
  • status: Resolved
  • priority: Major
  • resolution: Fixed
  • resolved: 2017-02-14T19:54:20+00:00
  • imported: 2022/01/10
timja commented 8 years ago

filipejtdias:

same here!

please solve this

timja commented 8 years ago

bjam:

I am also seeing this on restart, and seems to be limited to jobs with RVM-managed environment checked

It is also clearing the job settings of plugins:

Jenkins v2.19
RVM Plugin v0.6

timja commented 8 years ago

mgreco2k:

As well as RVM and those settings being cleared as Brian has stated above ... I am also seeing all "Pre-Build Steps" and "Post Build Steps" being completely ignored. They show up in the config.xml file, yet the UI does not display them, AND these steps aren't being run anymore.

I am able to provide some of my config.xml files to help solve this.

And if there is a way to get better logging written to /var/log/jenkins/jenkins.log please let me know. I'd be happy to help out in anyway I can.

Thank you -

Jenkins ver. 2.21
RVM Plugin v0.6

[jenkins@eprov-jenkins01 ~]$ rvm list
rvm rubies
=* ruby-2.1.2 [ x86_64 ]
ruby-2.2.1 [ x86_64 ]

timja commented 8 years ago

mgreco2k:

It's the ruby runtime plugin .13.

I went back to 0.12 (from 0.13) and then all the jobs that I created when RVM Plugin 0.6 was installed start working. This helps a little but still the older jobs I created when RVM Plugin 0.4 was installed still need their configuration updated :

https://github.com/jenkinsci/rvm-plugin/blob/master/README.md

This one is a little hard to see cause it only pops up after a jenkins reboot and then looking at a job that has RVM set in it and seeing that part of the config show up blank in the UI as if it was never set (yet seeing RVM details set in the config.xml file).

timja commented 8 years ago

mvardi:

Hi mgreco2k,

I will try to downgrade ruby runtime plugin.

Thank you for your help,
Menahem

timja commented 8 years ago

klehno00:

I was facing the same issue but with the RBENV plugin. I configured it for a job in the 'Build Environment' section to use Ruby version 2.2.4. Every time Jenkins service gets restarted or server rebooted it was dropping this configuration on the job level. Strange thing was also when I checked the config.xml file for this job it still looked the same and timestamp of that file didnt even change. Is there a cache Jenkins keeping that information before fetching from config.xml again?

Anyway downgrading the Ruby-Runtime-Plugin from 0.13 to 0.12 helped in my case as well.

I would like to know what the difference is between these versions but doesnt seem to be under github?!

timja commented 8 years ago

mikecaspar:

I don't know if it helps or hinders, but this Seems to be related (or similar) to this old issue...

https://issues.jenkins-ci.org/browse/JENKINS-38145

Hope it helps.

timja commented 8 years ago

jwstric2:

Wish my team had read this thread before we did an upgrade. We found 1 current workaround is to "reload configuration" after the reboot. For some reason, this will enables the build environment configuration.

As noted above, downgrade from 0.13 -> 0.12 fixes the issue.

timja commented 8 years ago

duffyjp:

For me nothing in Build Environment sticks. I use Color ANSI, RVM, and SSH Agent and have to reset these at least once a day. On all my jobs...

The Reload Configuration trick mentioned above doesn't work for me.

Jenkins 2.19.2
ruby-runtime 0.13
rvm 0.6
AnsiColor 0.4.2
SSH Agent 1.13
Ubuntu 14.04LTS

timja commented 7 years ago

wallamatt:

Our team is encountering the same issue. Our build machine is a mac mini running Jenkins 2.35. On each machine restart or jenkins restart, all Build Environment options are cleared. This includes Delete workspace, setting the Ruby environment using RVM or rbenv, and all Android emulator options. We have over a dozen jobs and are creating more daily; it is painful to go back and update these on each restart.

Note: I rolled back to ruby-runtime 0.12 and did not see any improvements.

timja commented 7 years ago

cantorman:

related: https://issues.jenkins-ci.org/browse/JENKINS-37353

timja commented 7 years ago

cantorman:

I have gone as far as to create an hourly job that commits changes to config.xml files in my jobs dir if they are updated. Later, jenkins crashed and the config.xml files were modified as noted earlier in this bug. I used git to revert the change and reloaded from config in two different ways:

timja commented 7 years ago

scm_issue_link:

Code changed in jenkins
User: Daniel Spilker
Path:
src/main/resources/artifact-ignores.properties
http://jenkins-ci.org/commit/backend-update-center2/803812c3149e03194f3e77a39c1dcd7a1c27eca7
Log:
do not distribute ruby-runtime 0.13 (#101)

see JENKINS-37353, JENKINS-37771 and JENKINS-38145

timja commented 7 years ago

daspilker:

ruby-runtime 0.13 is no longer available in the Update Center, you need to downgrade to 0.12 to fix the problem.

timja commented 2 years ago

[Duplicates: JENKINS-38145]

timja commented 2 years ago

[Originally duplicated by: JENKINS-37353]

timja commented 2 years ago

[Originally related to: JENKINS-39193]