Downgrade Jenkins - jenkins

I updated Jenkins a few days ago. But in the current Jenkins version, there are some annoying bugs. Is it possible to downgrade the version of Jenkins and if this is possible, how is it possible to do it?

I have been struggling with downgrading Jenkins as well, lately because the latest version seems to have a problem handling JDK 5 code (which I am unfortunately tied to for a little while longer)
Here's how I did my downgrade:
Locate an earlier stable version at https://updates.jenkins-ci.org/
Download the war file
Stop the Jenkins service
Replace the jenkins.war with the new.
Restart the service.
I had an additional issue with the configuration file not being compatible. E.g. In my case I had to disable matrix to get the service running. Your case may be different, so I suggest another question.

I easily rolled back to the last working version bydoing below steps:
Go to the location where jenkins is installed.
Rename jenkins.war if it exists to jenkins.war.corrupted
You would find a file jenkins.war.bak in same direcotry. Rename it to 'jenkins.war'

Downgrading should be equivalent to the upgrading process:
To upgrade from earlier versions of Jenkins, simply redeploy the WAR
file. Read this document for more about container-specific
instructions on how to do this. See this document for automation.

In my case, I followed the process below -
Download the jenkins.war file from https://updates.jenkins-ci.org
Stop the Jenkins service
Replace the jenkins.war with the new.
Restart the service.
Done

If you have upgraded from front end (i.e. Manage Jenkins > Upgrade Jenkins) Then you will get an option to Downgrade also from there (under Manage Jenkins -- restore to previous version)

Related

Problem with Jenkins plugins when moving to a new computer

After moving Jenkins to a new computer I cannot upgrade plugins since it thinks the new version is older than the installer.
I get the following message:
Some plugins could not be loaded due to unsatisfied dependencies. Fix these issues and restart Jenkins to re-enable these plugins.
Dependency errors:
Static Analysis Utilities (1.96)
Update required: Maven Integration plugin (2.12.1) to be updated to 2.17 or higher
Update required: Matrix Project Plugin (1.6) to be updated to 1.7.1 or higher
Update required: OWASP Markup Formatter Plugin (1.3) to be updated to 1.5 or higher
and several more.
I then try to upgarde Maven INtegration polugin (and alla others) it looks like the are installed and Jenkins is restarted. But I get the same error again.
When looking in the plugin folder I see that I have several version of the plugin. I try to remove the different folders and then detect that the old verision is still used even if the new version is available in the folder.
In the pluginmanager/installed the Maven Integration plugin is listed as version 2.12.1 and the possibility to DOWNGRADE to 3.8. 3.8 is the version that I upgrade to.
My conclusion is that during the move of the .jenkins folder to the new computer the dates of the old plugins are getting new values which confuses Jenkins. Is that a correct conclusion? How can I correct it?
Since the folder dates were changed long ago at the old computer I was not able to zip the old .jenkins folder with "correct" dates
However, I found a way forward anyway. I did like this:
Started with a newly installed Jenkins version.
Made sure I had all necessary plugins in the new Jenkins installation
Copied the following folders from the old computers .jenkins zip file:
jobs
nodes
secrets
users
workspace
Then I also moved the files in the .jenkins folder

Issue with Jenkins Serer Upgarde

we have upgraded jenkins. war to the latest version and we can see the latest version in Jenkins console as well.
But the issue is when we open add/or remove programs from control panel it is still pointing to the old version. Please let me know what can be done to resolve the issue.
You don't have to do anything. This will have no effect on your set up. Though Add or remove programs will show the earlier version that you installed but whenever you decide to uninstall it, it's going to uninstall whichever version will be present in your Jenkins installation directory.
Note: What i have observed is that it actually removes the Windows service when it uninstalls but leaves the Jenkins installation directory structure intact.

Jenkins version upgrade from 1.613 to latest one

I want to upgrade my Jenkins version from 1.613 to latest one i.e 2.80 , As my current Jenkins version is 2 years old, I see My java version is 1.7 and I want to upgrade the java version as newer Jenkins version needs Java 1.8 , Is there anyway I can upgrade my Jenkins without any downtime and without a mess ..? I am afraid I cant roll back java Once I upgrade it to 1.8 and also I am afraid of all plugins. What necessary action I need to take ..? I see my Jenkins is in /var/lib
Please help me guys
Thanks
If you just keep a backup of your original war file and your entire JENKINS_HOME directory, your risk is minimal if something goes wrong.
Something like this should make it pretty easy:
Try it all on a backup server first, though this is optional:
Copy the jenkins war file and the JENKINS_HOME directory to a new machine, set the JENKINS_HOME variable to point to the place you copied JENKINS_HOME to, then start Jenkins. Make sure it all works like it should. You can even make a copy on the same machine but in a different directory if you start it up on another port. Now you can try the upgrade steps on non-production instance.
The actual upgrade should be fairly painless. Shut down Jenkins, make a backup of everything, then start Jenkins using the new war file. Log in and test. If something doesn't work, remove the JENKINS_HOME and replace with your backup. Start back up with the original war file.

Jenkins upgrade to 2.32.3 issue?

Recently i have upgraded Jenkins from v1.596.2 to 2.32.3(LTS). But after upgradation i am getting following error but no clear how to rectify it.
=========================================================================
Tomcat Deploy v1.0.16
You must update Jenkins from v2.32.3 to v3.0.0 or later to run this plugin.
Ok so I had the same problem (but with others plugins).
To fix that:
Put Jenkins in "Prepare for Shutdown" mode and shutdown it
On the server HDD go to JENKINS_HOME/plugins and delete (or move elsewhere) the folder and hpi file corresponding to plugin which produce warnings. (The name of file/folder can be a little bit different than the plugin name displayed in Jenkins)
Restart Jenkins. Warning should be deleted

Jenkins plugin upgrade

I have a large fleet of Jenkins instances running in a cluster, all having the LDAP plugin version 1.6 (Jenkins version 1.611). I want to fleet-upgrade the LDAP plugin version to 1.7 (to incorporate environment variables in my plugin configuration). How do I achieve this without manually uploading 1.7 version through UI for each Jenkins instance?
I tried writing a script which basically performs these operations for each Jenkins instance:
Replace the existing .jpi/.hpi file in $JENKINS_HOME/plugins for ldap plugin with the correct .hpi file (of the 1.7 version)
Edit config.xml under $JENKINS_HOME which has the version number
Safe restart Jenkins
It works fine till step 2 but as soon as I perform safe restart, Jenkins magically puts in the original .jpi/.hpi file (the 1.6 version file) back inside $JENKINS_HOME/plugins. Jenkins instance has the 1.6 plugin version again in the UI. Is there a better way to perform fleet plugin upgrades in general? I want to mention that I want the 1.7 plugin version, not the latest
How do I fix this? I even tried using curl (mentioned at https://stackoverflow.com/a/20848745/1746529) but didn't help.
Got a working answer on Google groups.
"As you are on 1.x create an empty ldap.jpi.pinned file as a sibling and that marker will instruct Jenkins not to replace with the bundled plugin."
Came across the documentation for it as well - https://wiki.jenkins-ci.org/display/JENKINS/Pinned+Plugins

Resources