puppet-jenkins
puppet-jenkins copied to clipboard
Add ability for removing jenkins plugin
Please provide ability to remove installed plugin. I suggest the following syntax:
class { 'jenkins':
plugin_hash => {
'cvs' => { version => 'absent' }
}
}
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.
@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 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 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.
The code suggests there is code to ensure disabled. You can also purge all plugins, but not ensure absent today.