The plugin manager downloads plugins and their dependencies into a folder so that they can be easily imported into an instance of Jenkins. The goal of this tool is to replace the Docker install-plugins.sh script and the many other implementations of plugin management that have been recreated across Jenkins. The tool also allows users to see more information about the plugins they are downloading, such as available updates and security warnings. By default, plugins will be downloaded; the user can specify not to download plugins using the --no-download option.
Download the latest jenkins-plugin-manager jar from here and run it as shown below.
java -jar jenkins-plugin-manager-*.jar --war /your/path/to/jenkins.war --plugin-download-directory /your/path/to/plugins/ --plugin-file /your/path/to/plugins.txt --plugins delivery-pipeline-plugin:1.3.2 deployit-plugin
Alternatively, build and run the plugin manager yourself from source:
mvn clean install java -jar plugin-management-cli/target/jenkins-plugin-manager-*.jar --war /file/path/jenkins.war --plugin-download-directory /your/path/to/plugins/ --plugin-file /file/path/plugins.txt --plugins delivery-pipeline-plugin:1.3.2 deployit-plugin
If you use a Jenkins docker image the plugin manager can be invoked inside the running container via the bundled jenkins-plugin-cli
shell script:
docker cp /your/path/to/plugins.txt <container_name>:/tmp/plugins.txt docker exec -it <container_name> /bin/bash jenkins-plugin-cli --plugin-file /tmp/plugins.txt --plugins delivery-pipeline-plugin:1.3.2 deployit-plugin cp -r -p /usr/share/jenkins/ref/plugins/. /var/jenkins_home/plugins/. exit
--plugin-file
or -f
: (optional) Path to the plugins.txt, or plugins.yaml file, which contains a list of plugins to install. If this file does not exist, or if the file exists, but does not have a .txt or .yaml/.yml extension, then an error will be thrown.--plugin-download-directory
or -d
: (optional) Directory in which to install plugins. This configuration can also be made via the PLUGIN_DIR environment variable. The directory will be first deleted, then recreated. If no directory configuration is provided, the defaults are C:\ProgramData\Jenkins\Reference\Plugins if the detected operating system is Microsoft Windows, or /usr/share/jenkins/ref/plugins otherwise.--plugins
or -p
: (optional) List of plugins to install (see plugin format below), separated by a space.--clean-download-directory
: (optional) If sets, cleans the plugin download directory before plugin installation. Otherwise the tool performs plugin download and reports compatibility issues, if any.--jenkins-version
: (optional) Version of Jenkins to be used.
If not specified, the plugin manager will try to extract it from the WAR file or other sources.
The argument can be also set using the JENKINS_VERSION
environment variable.--war
or -w
: (optional) Path to Jenkins war file. If no war file is entered, it will default to a specific location based on user's OS. In case of Windows, it will default to C:\ProgramData\Jenkins\jenkins.war and in case of OS other than Windows, it will default to /usr/share/java/jenkins.war. Plugins that are already included in the Jenkins war will only be downloaded if their required version is newer than the one included.--list
or -l
: (optional) Lists plugin names and versions of: installed plugins (plugins that already exist in the plugin directory), bundled plugins (non-detached plugins that exist in the war file), plugins that will be downloaded (highest required versions of the requested plugins and dependencies that are not already installed), and the effective plugin set (the highest versions of all plugins that are already installed or will be installed)--verbose
: (optional) Show additional information about plugin dependencies and the download process--hide-security-warnings
: (optional) Hide if any of the user specified plugins have security warnings--view-all-security-warnings
: (optional) Show all plugins that have security warnings.--available-updates
: (optional) Show if any requested plugins have newer versions available. If a Jenkins version-specific update center is available, the latest plugin version will be determined based on that update center's data.--output {stdout,yaml,txt}
: (optional) Format to output plugin updates file in, stdout is the default.--latest {true,false}
: (optional) Set to false to download the minimum required version of all dependencies.--latest-specified
: (optional) (advanced) Download latest dependencies of any plugin that is requested to have the latest version. All other plugin dependency versions are determined by the update center metadata or the plugin MANIFEST.MF.--jenkins-update-center
: (optional) Sets the main update center filename, which can also be set via the JENKINS_UC environment variable. If a CLI option is entered, it will override what is set in the environment variable. If not set via CLI option or environment variable, will default to https://updates.jenkins.io/update-center.actual.json--jenkins-experimental-update-center
: (optional) Sets the experimental update center, which can also be set via the JENKINS_UC_EXPERIMENTAL environment variable. If a CLI option is entered, it will override what is set in the environment variable. If not set via CLI option or environment variable, will default to https://updates.jenkins.io/experimental/update-center.actual.json--jenkins-incrementals-repo-mirror
: (optional) Sets the incrementals repository mirror, which can also be set via the JENKINS_INCREMENTALS_REPO_MIRROR environment variable. If a CLI option is entered, it will override what is set in the environment variable. If not set via CLI option or environment variable, will default to https://repo.jenkins-ci.org/incrementals.--jenkins-plugin-info
: (optional) Sets the location of plugin information, which can also be set via the JENKINS_PLUGIN_INFO environment variable. If a CLI option is provided, it will override what is set in the environment variable. If not set via CLI option or environment variable, will default to https://updates.jenkins.io/current/plugin-versions.json.--version
or -v
: (optional) Displays the plugin management tool version and exits.--no-download
: (optional) Do not download plugins. By default plugins will be downloaded.--skip-failed-plugins
: (optional) Adds the option to skip plugins that fail to download - CAUTION should be used when passing this flag as it could leave
Jenkins in a broken state.--credentials
: (optional) Comma-separated list of credentials to use for Basic Authentication for specific hosts (and optionally ports). Each value must adhere to format <host>[:port]:<username>:<password>
. The password must not contain a ,
! The credentials are not used preemptively.CACHE_DIR
: used to configure the directory where the plugins update center cache is located. By default it will be in ~/.cache/jenkins-plugin-management-cli
,
if the user doesn't have a home directory when it will go to: $(pwd)/.cache/jenkins-plugin-management-cli
.
JENKINS_UC_DOWNLOAD
: DEPRECATED use JENKINS_UC_DOWNLOAD_URL
instead.
JENKINS_UC_DOWNLOAD_URL
: used to configure a custom URL from where plugins will be downloaded from. When this value is set, it replaces the plugin download URL found in the update-center.json
file with ${JENKINS_UC_DOWNLOAD_URL}
. Often used to cache or to proxy the Jenkins plugin download site.
If set then all plugins will be downloaded through that URL.
JENKINS_UC_HASH_FUNCTION
: used to configure the hash function which checks content from UCs. Currently SHA1
(deprecated), SHA256
(default), and SHA512
can be specified.
The expected format for plugins in the .txt file or entered through the --plugins
CLI option is artifact ID:version
or artifact ID:url
or artifact:version:url
Use plugin artifact ID, without -plugin extension. If a plugin cannot be downloaded, -plugin will be appended to the name and download will be retried. This is for cases in which plugins don't follow the rules about artifact ID (i.e. docker plugin).
The version and download url are optional. By default, the latest version of the plugin will be downloaded. If both a version and a url are supplied, the version will not be used to determine the plugin download location and the library will attempt to download the plugin from the given url.
The following custom version specifiers can also be used:
latest
- downloads the latest version from a version specific update center if one exists for the version in the Jenkins war file. If no version specific update center exists, will use the main update center https://updates.jenkins.ioexperimental
- downloads the latest version from the experimental update center, which offers Alpha and Beta versions of plugins. Default value: https://updates.jenkins.io/experimentalincrementals;org.jenkins-ci.plugins.workflow;2.19-rc289.d09828a05a74
- downloads the plugin from the incrementals repo. For this option you need to specify groupId of the plugin. Note that this value may change between plugin versions without notice. More information on incrementals and their use for Docker images can be found here.A set of plugins can also be provided through a YAML file, using the following format:
plugins: - artifactId: git source: version: latest - artifactId: job-import-plugin source: version: 2.1 - artifactId: docker - artifactId: cloudbees-bitbucket-branch-source source: version: 2.4.4 - artifactId: script-security source: url: http://ftp-chi.osuosl.org/pub/jenkins/plugins/script-security/1.56/script-security.hpi - artifactId: workflow-step-api groupId: org.jenkins-ci.plugins.workflow source: version: 2.19-rc289.d09828a05a74 ...
As with the plugins.txt file, version and URL are optional. If no version is provided, the latest version is used by default. If a groupId is provided, the tool will try to download the plugin from the Jenkins incrementals repository.
The CLI can output a new file with a list of updated plugin references.
Text format:
$ java -jar jenkins-plugin-manager-*.jar --available-updates --output txt --plugins mailer:1.31
Result:
mailer:1.32
YAML format:
$ java -jar jenkins-plugin-manager-*.jar --available-updates --output yaml --plugins mailer:1.31
Result:
plugins: - artifactId: "mailer" source: version: "1.32"
Human readable:
$ java -jar jenkins-plugin-manager-*.jar --available-updates --plugins mailer:1.31
Result:
Available updates:
mailer (1.31) has an available update: 1.32
If a URL is included, then a placeholder should be included for the version. Examples of plugin inputs:
github-branch-source
- will download the latest versiongithub-branch-source:latest
- will download the latest versiongithub-branch-source:2.5.3
- will download version 2.5.3github-branch-source:experimental
- will download the latest version from the experimental update centergithub-branch-source:2.5.2:https://updates.jenkins.io/2.121/latest/github-branch-source.hpi
- will download version of plugin at url regardless of requested versiongithub-branch-source:https://updates.jenkins.io/2.121/latest/github-branch-source.hpi
- will treat the url like the version, which is not likely the behavior you wantgithub-branch-source::https://updates.jenkins.io/2.121/latest/github-branch-source.hpi
- will download plugin from urlIf a plugin to be downloaded from the incrementals repository is requested using the -plugins option from the CLI, the plugin name should be enclosed in quotes, since the semi-colon is otherwise interpreted as the end of the command.
java -jar jenkins-plugin-manager-*.jar -p "workflow-support:incrementals;org.jenkins-ci.plugins.workflow;2.19-rc289.d09828a05a74"
Proxy support is available using standard Java networking system properties http.proxyHost
and http.proxyPort
. Note that this provides only basic NTLM support and you may need to use an authentication proxy like CNTLM to cover more advanced authentication use cases.
# Example using proxy system properties java -Dhttp.proxyPort=3128 -Dhttp.proxyHost=myproxy.example.com -Dhttps.proxyPort=3128 -Dhttps.proxyHost=myproxy.example.com -jar jenkins-plugin-manager-*.jar
The plugin manager tries to use update center data to get the latest information about a plugin's dependencies. If this information is unavailable, it will use the dependency information from the downloaded plugin's MANIFEST.MF file. By default, the versions of the plugin dependencies are determined by the update center metadata or the plugin MANIFEST.MF file, but the user can specify other behavior using the latest
or latest-specified
options.
For plugins listed in a .txt file, each plugin must be listed on a new line. Comments beginning with #
will be filtered out.
Support for downloading plugins from maven is not currently supported. JENKINS-58217
When using --latest
you may run into a scenario where the jenkins update mirror contains the directory of the newer version of a plugin(release in progress), regardless of if there is a jpi to download, which results in a download failure. It's recommended that you pin your plugin requirement versions until the mirror has been updated to more accurately represent what is available. More information on this challenge can be found here, and here.
The version-pinning behavior of this plugin installer has changed compared to the previous Jenkins plugin installer. By default, --latest
option defaults to true
, which means that even if you pass a list of pinned versions, these may fail to be installed correctly if they or some other dependency has a newer latest version available. In order to use only pinned versions of plugins, you must pass --latest=false
. NOTE: When a new dependency is added to a plugin, it won’t get updated until you notice that it’s missing from your plugin list. (Details here: https://github.com/jenkinsci/plugin-installation-manager-tool/issues/250)
Thanks to all our contributors! Check out our CONTRIBUTING file to learn how to get started with issues.
AI辅助编程,代码自动修复
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。
AI小说写作助手,一站式润色、改写、扩写
蛙蛙写作—国内先进的AI写作平台,涵盖小说、学术、社交媒体等多场景。提供续写、改写、润色等功能,助力创作者高效优化写作流程。界面简洁,功能全面,适合各类写作者提升内容品质和工作效率。
全能AI智能助手,随时解答生活与工作的多样问题
问小白,由元石科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。
实时语音翻译/同声传译工具
Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。
一键生成PPT和Word,让学习生活更轻松
讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。
深度推理能力全新升级,全面对标OpenAI o1
科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。
一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型
Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。
AI助力,做PPT更简单!
咔片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。
选题、配图、成文,一站式创作,让内容运营更高效
讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。
专业的AI公文写作平台,公文写作神器
AI 材料星,专业的 AI 公文写作辅助平台,为体制内工作人员提供高效的公文写作解决方案。拥有海量公文文库、9 大核心 AI 功能,支持 30 + 文稿类型生成,助力快速完成领导讲话、工作总结、述职报告等材料,提升办公效率,是体制打工人的得力写作神器。
最新AI工具、AI资讯
独家AI资源、AI项目落地
微信扫一扫关注公众号