Forked from hgomez/jenkins-plugins-batch-install.md
Last active
March 16, 2025 21:13
-
-
Save riy/ee85b25aec121911319398378e661f6e to your computer and use it in GitHub Desktop.
Mass install/update of Jenkins Plugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Scripted Jenkins Plugins install | |
Jenkins has a very rich catalog of plugins and it's quite easy to install and update them via UI. | |
BTW, when you want to add tons of plugin via UI, it's a fairly long and boring procedure. | |
Hopefully, mass installation (or update) could be easy using a simple bash script (curl/python required) : | |
* https://raw.githubusercontent.com/hgomez/devops-incubator/master/forge-tricks/batch-install-jenkins-plugins.sh | |
Create a file containing plugins to be installed (or updated), ie iplugins : | |
analysis-core | |
audit-trail | |
build-flow-plugin | |
buildgraph-view | |
build-metrics | |
build-timeout | |
changelog-history | |
claim | |
config-file-provider | |
configurationslicing | |
console-column-plugin | |
dashboard-view | |
greenballs | |
htmlpublisher | |
mercurial | |
sonar | |
ssh-agent | |
thucydides | |
timestamper | |
viewVC | |
WebSVN2 | |
If you want some plugins to be excluded, for example those found in dependency list, create a second file with excluded list (ie, xplugins): | |
ant | |
antisamy-markup-formatter | |
credentials | |
cvs | |
external-monitor-job | |
javadoc | |
ldap | |
mailer | |
matrix-auth | |
maven-plugin | |
pam-auth | |
ssh-credentials | |
ssh-slaves | |
subversion | |
translation | |
windows-slaves | |
Then get script : | |
curl -L https://raw.githubusercontent.com/hgomez/devops-incubator/master/forge-tricks/batch-install-jenkins-plugins.sh -o batch-install-jenkins-plugins.sh | |
* --plugins (or -p) is for file containing plugins to be installed | |
* --excludedplugins (or -e) is for file containing plugins to be excluded | |
* --plugindir (or -p) is for directory path to copy plugins (.jpi) | |
batch-install-jenkins-plugins.sh --plugins iplugins --excludedplugins xplugins --plugindir /var/lib/myjenkins/plugins | |
batch-install-jenkins-plugins.sh will download json file containing up to date plugins and will download plugins to be installed and non optional dependent plugins | |
Of course, better run this script when Jenkins is down to avoid runtime issue. | |
Script powo ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment