Open itavero opened 10 years ago
This used to not be possible, but it looks like they've added support for this at some point. Let me take a look at it and see if I can use it to provide this capability.
Awesome! If I can help in any way, please let me know and I'll see what I can do. :+1:
+1 would really appreciate this feature
Perhaps I'll have some time in the coming weeks to add this functionality. I'll let you know if/when I start working on it :wink:
Have done some research how to do this. Probably this should work via HTTP POST like described here https://gist.github.com/basmussen/8182784 or via jenkins-cli https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/cli/InstallPluginCommand.java
Could imagine a really simple DSL extension:
jenkins {
servers {
[...]
}
plugins {
git:2.3.4
gradle:latest
}
jobs {
[...]
}
}
I'd really welcome a contribution for this. I just haven't had the time lately to devote to it.
Finally found some time to look into this. Apparently plug-ins can be installed by sending an XML containing the plug-ins and the version you wish to install (have a look at this blogpost). I would like to implement this in your plug-in, however I first need to wrap my head around the code. Is it just me or do a lot of (internal) interfaces not have any documentation at all?
Additional notes:
http://localhost:8080/pluginManager/api/json?tree=plugins[shortName,version,longName,active,enabled,hasUpdate]
http://localhost:8080/updateCenter/api/json?tree=sites[id,url]
This should return at least the default update-center.json link. This JSON file contains data that can be used to provide a mechanism saying that you wish to install the latest version of a plugin, for example.
I don't know if this is at all possible, but it would be nice to add "dependencies" for certain Jenkins CI plugins. Then, when updating the jobs, it should check if these plugins are installed and install them if they are not yet present.
We are thinking about using this plugin and Gradle to setup new projects. This way configuring a new build server would be easier than ever (just run a single Gradle task and you're good to go).