Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins - Cancel Uninstall Plugin

I clicked uninstall for a plugin and now the Plugin Manager is showing me "Uninstallation pending" for that plugin, however, I have decided to keep the plugin. Since I cannot restart Jenkins and reinstall it at the moment, is there a way that I can cancel the request to uninstall this plugin?

Thanks!

like image 847
Sean Chon Avatar asked Jun 22 '17 22:06

Sean Chon


1 Answers


Jenkins plugin's are under $JENKINS-HOME/plugins, [plugin].jpi files (similar content to war files, WEB-INF, META-INF) are located under this folder.

Jenkins extract these files into folder with the same name

$ ls $JENKINS-HOME/plugins/gradle*
gradle.jpi //installation file 
gradle.jpi.pinned // flag file for pinned plugin 
gradle.jpi.disabled // flag file for disabled plugin 
gradle.bak // previous version jpi file
gradle: // extracted folder
help-GradleInstallation-home.html  help-GradleInstallation-name.html  help.html  META-INF  WEB-INF
  • if [plugin].jpi.pinned exists the plugin is pinned

enter image description here

  • if [plugin].jpi.disabled exists the plugin is disabled

enter image description here

  • when you upgrade plugin the old [plugin].jpi is renamed to [plugin].bak the new one is [plugin].jpi this allows the rollback (downgrade) option enter image description here

    • if [plugin].jpi is missing the plugin is pending uninstallion, on next restart Jenkins will delete all the files relevant to the plugin

    enter image description here

So, all you need to do is copy the [pluging].jpi* and [plugin] folder into $JENKINS-HOME/plugins/ folder and refresh the page, you will see it is not pending uninstall anymore.

*always recomanded to keep backup of $JENKINS-HOME dir

like image 120
Avihay Tsayeg Avatar answered Oct 30 '22 06:10

Avihay Tsayeg