Skip to content

Instantly share code, notes, and snippets.

View yuval2313's full-sized avatar
πŸ’­
✌

Yuval Levy yuval2313

πŸ’­
✌
View GitHub Profile
@alecharp
alecharp / keep-jenkins-plugins-uptodate.groovy
Last active March 20, 2025 20:02
Simple groovy script to upgrade active plugins when new versions are available
jenkins.model.Jenkins.getInstance().getUpdateCenter().getSites().each { site ->
site.updateDirectlyNow(hudson.model.DownloadService.signatureCheck)
}
hudson.model.DownloadService.Downloadable.all().each { downloadable ->
downloadable.updateNow();
}
def plugins = jenkins.model.Jenkins.instance.pluginManager.activePlugins.findAll {
it -> it.hasUpdate()