Install Specific Version of a Plugin with Install-Plugin Command

I cant see examples of how to do this:

I backup a list of all plugins installed and their versions.

I want to use install-plugin command to install all plugins (and their specific versions) from the list.

I dont see option to specify version to install-plugin command

2 Answers

To install a specific version you can run the command and pass a parameter with a colon like this: install-plugins.sh git:3.9.1

or alternatively add the list of plugins to a file (plugins.txt for instance):

git:3.9.1
saml:1.0.7

and run it with the following command: install-plugins.sh plugins.txt

For versions of Jenkins 2.357 an up, install-plugins.sh has been removed. The command should now be this: /bin/jenkins-plugin-cli -f /usr/share/jenkins/ref/plugins.txt

1

You can download jar file from here:

$ rm -rf /usr/share/jenkins/plugins/ldap*

$ ls /usr/share/jenkins/plugins/ldap*
ls: cannot access '/usr/share/jenkins/plugins/ldap*': No such file or directory

$ echo $JAVA_OPTS
-Djenkins.install.runSetupWizard=false

$ java $JAVA_OPTS -jar /opt/jenkins-plugin-manager-2.12.8.jar --plugins ldap:2.7
Done

$ ls /usr/share/jenkins/plugins/ldap*
/usr/share/jenkins/plugins/ldap.jpi

$ echo ""


$ ls /usr/share/jenkins/plugins/ldap*
/usr/share/jenkins/plugins/ldap.jpi

/usr/share/jenkins/plugins/ldap:
META-INF  WEB-INF

$ cat /usr/share/jenkins/plugins/ldap/META-INF/MANIFEST.MF
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: rsandell
Build-Jdk: 1.8.0_211
Extension-Name: ldap
Specification-Title: The Jenkins Plugins Parent POM Project
Implementation-Title: ldap
Implementation-Version: 2.7
Group-Id: org.jenkins-ci.plugins
Short-Name: ldap
Long-Name: LDAP Plugin
Url: 
Compatible-Since-Version: 1.16
Minimum-Java-Version: 1.8
Plugin-Version: 2.7
Hudson-Version: 2.277.1
Jenkins-Version: 2.277.1
Plugin-Dependencies: mailer:1.34
Plugin-Developers:
Plugin-License-Name: The MIT license
Plugin-License-Url: 
Plugin-ScmUrl: 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest