如何从命令行安装jenkins插件? [英] How to install jenkins plugins from command line?

查看:730
本文介绍了如何从命令行安装jenkins插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从命令行安装jenkins插件?

Is there any option to install jenkins plugins from command line ?

经过一点Google搜索后,我找到了一个命令:

I found a command for this after a bit google search :

java -jar /var/lib/jenkins/jenkins.war -s http://127.0.0.1:8080/ install-plugin ${Plugin_Name}

但是它不起作用.

推荐答案

按照詹金斯 http://localhost:8080/cli

As per the Jenkins command line interface documentation, you need to use the client JAR file (not the server WAR file you're using), which you can obtain directly from Jenkins, e.g. via the links on http://localhost:8080/cli

然后您可以使用以下JAR运行命令:

Then you can run the command using this JAR:

java -jar jenkins-cli.jar -s http://127.0.0.1:8080/ install-plugin <name>

这将下载安装所需的插件以及其任何依赖项.

This will download install the plugin you want, along with any of its dependencies.

这篇关于如何从命令行安装jenkins插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆