Why doesn't copying an hpi file to JENKINS_HOME/plugins/ work?

718 views
Skip to first unread message

Code

unread,
Jun 9, 2014, 12:10:35 AM6/9/14
to jenkin...@googlegroups.com
My goal is to create a script to automatically install and setup jenkins on a linux instance (CentOs.) Jenkins document says I can manually install a plugin by copying the hpi/jpi file to plugins directory. I tried to do that by using the following commands

cd /var/lib/jenkins/plugins

then I checked and the file was there. So, I restarted the service (service jenkins restart.) After the website was back online, I went to JENKINS_URL/pluginManager/installed but checknorris wasn't there. I would like to know what I did wrong and how I can fix this issue.

Thanks!


Mark Waite

unread,
Jun 9, 2014, 12:17:39 AM6/9/14
to jenkin...@googlegroups.com
If you're already scripting, and you're installing a plugin from the update center, couldn't just just as easily use the command line interface?

For example, I use the command:

java -jar jenkins-cli.jar -s http://wheezy64b:8080/ install-plugin git git-client

https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI gives more instructions on using the command line interface.

Mark Waite


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks!
Mark Waite

Jesse Glick

unread,
Jun 10, 2014, 10:04:33 AM6/10/14
to jenkin...@googlegroups.com
On Mon, Jun 9, 2014 at 12:10 AM, Code <ekka...@gmail.com> wrote:
> curl -O http://updates.jenkins-ci.org/latest/chucknorris.hpi

Try saving as chucknorris.jpi.

Code

unread,
Jun 10, 2014, 11:07:25 PM6/10/14
to jenkin...@googlegroups.com
I changed to use jenkins-cli.jar as you suggested and it works as I expected.

Richard Bywater

unread,
Jun 10, 2014, 11:10:02 PM6/10/14
to jenkin...@googlegroups.com
FYI if you don't have Java installed on the machine that is wanting to make the call to add the plugin, you can do it via the SSH mechanism too. See https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+SSH

Richard.
Reply all
Reply to author
Forward
0 new messages