Is there any option to install jenkins plugins from command line ?
I found a command for this after a bit google search :
java -jar /var/lib/jenkins
Since Sept 2019, you can also use the Plugin Installation Manager Tool. It takes a yaml file listing the plugins, and downloads plugins to a folder of your choice. There is no need to have a running Jenkins instance. You can specify the plugin versions in the yaml file, but be aware of JENKINS-60205.
Get the plugin manager:
version=1.0.1
curl \
-L \
-X GET "https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/plugin-management-parent-pom-$version/jenkins-plugin-manager-$version.jar" \
-o jenkins-plugin-manager-$version.jar
Download the plugins:
java -jar jenkins-plugin-manager-$version.jar \
--plugin-download-directory pluginsFolder \
--plugin-file plugins.yml \
--war jenkins.war
The plugins are in the pluginsFolder
.