Jenkins与Atlassian Jira集成插件
jira-plugin是一款Jenkins插件,用于集成Atlassian Jira软件的云端和服务器版本。它能自动链接构建日志中的Jira问题、更新Jira问题状态、引用Jira版本信息及生成发布说明。此插件旨在提升开发团队工作效率,促进Jenkins和Jira系统间的协作。插件的主要功能包括自动链接Jira问题、更新问题状态、引用版本信息和生成发布说明。它支持Jira云端和服务器版本,适用于各种规模的开发团队。通过简化Jenkins和Jira之间的信息交互,该插件有助于提高项目管理和开发流程的效率。
This plugin integrates with Jenkins the Atlassian Jira Software (both Cloud and Server versions). For bug reports, see bugs or all open issues. For documentation, see official plugin site.
For plugin compatibility with Pipeline plugin, see COMPATIBILITY.
With Atlassian Jira Cloud, it's not possible to create a user without an email, so you need to create API token that will be used as a service user by Jenkins to execute API calls to Jira Cloud - follow Atlassian API tokens documentation
Then create a global Jenkins credential:
You can check if your API token works correctly by getting a correct JSON issue response with this command (where TEST-1 is an example issue in your project):
curl -X GET -u <email>:<API token> -H "Content-Type: application/json" https://<YourCloudInstanceName>.atlassian.net/rest/api/latest/issue/TEST-1
Also make sure that CAPTCHA is not triggered for your user as this will prevent the API token to work - see CAPTCHA section in Atlassian REST API documentation.
-Dhudson.plugins.jira.JiraMailAddressResolver.disabled=true
Use to disable resolving user email from Jira usernames. Currently there is no option for this in UI.
This plugin has an optional feature to update Jira issues with a back pointer to Jenkins build pages. This allows the submitter and watchers to quickly find out which build they need to pick up to get the fix.
When you configure your Jira site in Jenkins, the plugin will automatically hyperlink all matching issue names to Jira.
If you have additionally provided username/password to Jira, the hyperlinks will also contain tooltips with the issue summary.
If you also want to use this feature, you need to supply a valid user id/password. If you need the comment only to be visible to a certain Jira group, e.g. Software Development, enter the groupname.
Now you also need to configure jobs. I figured you might not always have write access to the Jira (say you have a Jenkins build for one of the Apache commons project that you depend on), so that's why this is optional.
The following screen shows how a Jira issue is updated:
By taking advantages of Jenkins' fingerprint feature, when your other projects that depend on this project pick up a build with a fix, those build numbers can also be recorded in Jira.
This is quite handy when a bug is fixed in one of the libraries, yet the submitter wants a fix in a different project. This happens often in my work, where a bug is reported against JAX-WS but the fix is in JAXB.
For curious mind, see this thread for how this works behind the scene.
To reference Jira Release versions in your build, you can pull these releases directly from Jira by adding the Jira Release Version Parameter.
This can be useful for generating release notes, trigerring
parameterized build, etc.
You can also generate release notes to be used during your build. These notes can be retrieved from an environment variable. See the Maven Project Plugin for
the environment variables found within the POM.
After your build has run, you can also have the plugin mark a release as resolved. This typically will be a release you specified in your Build Parameters.
The plugin can also move certain issues matching a JQL query to a new release version.
Sample usage of generated Release Notes:
Note: As a rule of thumb, you should be always using a service account (instead of a personal account) to integrate Jenkins with Jira.
Make sure that the Jira user used by Jenkins has enough permissions to execute its actions. You can do that via Jira Permission Helper tool.
If you encounter stacktrace like this:
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
make sure the JRE/JDK that Jenkins master is running (or the Jenkins slaves are running) contain the valid CA chain certificates that Jira is running with. You can test it using this SSLPoke.java class:
$ wget -O SSLPoke.java https://gist.githubusercontent.com/warden/e4ef13ea60f24d458405613be4ddbc51/raw/7f258a30be4ddea7b67239b40ae305f6a2e98e0a/SSLPoke.java $ /usr/java/jdk1.8.0_131/bin/javac SSLPoke.java $ /usr/java/jdk1.8.0_131/jre/bin/java SSLPoke jira.domain.com 443 Successfully connected
References:
Contribute or Sponsor!
We all love Open Source, but... Open Source Software relies on contributions of fellow developers. Please contribute by opening Pull Requests or if you are not a developer, consider sponsoring one of the maintainers.
New feature proposals and bug fix proposals should be submitted as Pull Requests. When adding new features please make sure that they support Jenkins Pipeline Plugin - see COMPATIBILITY.md for more information
There have been many developers involved in the development of this plugin and there are many downstream users who depend on it. Tests help us assure that we're delivering a reliable plugin and that we've communicated our intent to other developers in a way that they can detect when they run tests.
See MAINTAINERS for some useful info.
最强AI数据分析助手
小浣熊家族Raccoon,您的AI智能助手,致力于通过先进的人工智能技术,为用户提供高效、便捷的智能服务。无论是日常咨询还是专业问题解答,小浣熊都能以快速、准确的响应满足您的需求,让您的生活更加智能便捷。
像人一样思考的AI智能体
imini 是一款超级AI智能体,能根据人类指令,自主思考、自主完成、并且交付结果的AI智能体。
AI数字人视频创作平台
Keevx 一款开箱即用的AI数字人视频创作平台,广泛适用于电商广告、企业培训与社媒宣传,让全球企业与个人创作者无需拍摄剪辑,就能快速生成多语言、高质量的专业视频。
一站式AI创作平台
提供 AI 驱动的图片、视频生成及数字人等功能,助力创意创作
AI办公助手,复杂任务高效处理
AI办公助手,复杂任务高效处理。办公效率低?扣子空间AI助手支持播客生成、PPT制作、网页开发及报告写作,覆盖科研、商业、舆情等领域的专家Agent 7x24小时响应,生活工作无缝切换,提升50%效率!
AI辅助编程,代码自动修复
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。
AI小说写作助手,一站式润色、改写、扩写
蛙蛙写作—国内先进的AI写作平台,涵盖小说、学术、社交媒体等多场景。提供续写、改写、润色等功能,助力创作者高效优化写作流程。界面简洁,功能全面,适合各类写作者提升内容品质和工作效率。
全能AI智能助手,随时解答生活与工作的多样问题
问小白,由元石科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。
实时语音翻译/同声传译工具
Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。
一键生成PPT和Word,让学习生活更轻松
讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用 户精准表达,轻松呈现各种信息。
最新AI工具、AI资讯
独家AI资源、AI项目落地
微信扫一扫关注公众号