puppet-jenkins icon indicating copy to clipboard operation
puppet-jenkins copied to clipboard

Add ability for removing jenkins plugin

Open php-coder opened this issue 11 years ago • 5 comments

Please provide ability to remove installed plugin. I suggest the following syntax:

class { 'jenkins':                                                                                  
  plugin_hash => {
    'cvs' => { version => 'absent' }
  }
}

php-coder avatar Jul 05 '13 15:07 php-coder

Right now this isn't implemented at all and would be a bad idea to do blindly. If you remove a plugin manually, jobs that require that plugin might disappear.

We're looking into using a puppet package provider for Jenkins, but I've got limited time to work on it right now.

Similar to #11 , the remote CLI doesn't allow for removal at all. It might be possible via Groovy. Still not sure what will happen if the job requires a plugin and it's gone. This may allow you to break your Jenkins install.

matthewbarr avatar Jul 05 '13 16:07 matthewbarr

@php-coder In your mind, should version => absent cause the .jpi file to be removed, should the entries in the config.xml file be removed, and/or should plugin specific settings files be removed as well?

I think @matthewbarr is correct in that removing a plugin might break jobs, but this is no different than unchecking the plugin box in the Plugin Manager (as far as I know).

That said, you reference the "cvs" plugin, which is (IIRC) still a core plugin which can't actually be removed.

rtyler avatar Jul 05 '13 18:07 rtyler

@rtyler I expect that plugin removal from puppet works exactly as unchecking the plugin box in the Plugin Manager. Removal of "cvs" plugin was not appropriate example, because it belongs to core, but Plugin Manager allows to deselect it.

php-coder avatar Jul 09 '13 04:07 php-coder

@php-coder I can't actually find any indication that disabling a plugin affects anything on disk. An ensure => absent should remove the plugin IMHO, similar to what the "uninstall" button in the UI does.

I think I might punt on ensure => disabled until such a time that I can see what Jenkins does on disk when you check that box.

rtyler avatar Apr 01 '14 15:04 rtyler

The code suggests there is code to ensure disabled. You can also purge all plugins, but not ensure absent today.

ekohl avatar Sep 03 '20 10:09 ekohl