Jenkins 与 JIRA 集成插件之 JIRA Trigger Plugin
JIRA Trigger Plugin功能Triggers a build when a comment is added to JIRATriggers a build when an issue is updated in JIRATransforms JIRA Webhook POST data to Jenkins parametersTransforms JIRA standa...
·
JIRA Trigger Plugin功能
- Triggers a build when a comment is added to JIRA
- Triggers a build when an issue is updated in JIRA
- Transforms JIRA Webhook POST data to Jenkins parameters
- Transforms JIRA standard custom fields to Jenkins parameters (See CustomFieldParameterResolverTest for the full list of supported custom field types)
- Reply back to JIRA for scheduled builds
- Sets JIRA information as environment variables to the triggered build
Jenkens上安装插件: JIRA Trigger Plugin
插件地址:https://github.com/jenkinsci/jira-trigger-plugin
配置
JIRA 配置
Add new JIRA webhook (One time)
- Go to JIRA Administration> System > WebHooks (Requires admin permission)
- Create a new Webhook: Set URL to: ${Jenkins
URL}/jira-trigger-webhook-receiver/ e.g.
http://localhost:8080/jenkins/jira-trigger-webhook-receiver/ - Enable issue updated event
- If you are on JIRA Cloud, enable comment created event
- Do not check Exclude body as this plugin requires the JSON to operate
- Save!
JIRA webhook里必须要选择一个触发实践,如果没选择任何触发事件,则不能触发。
Jenkins 配置
Jenkins global configuration (One time)
This configuration is crucial, especially for JQL filter usage.
- Go to Jenkins global configuration (${Jenkins URL}/configure)
- Configure JIRA Trigger Configuration
Jenkins Job 配置
Comment trigger
JIRA里录入的comment要与这里的Comment pattern匹配才能触发job
Changelog trigger
Demo
在JIRA的DEV项目的一个user story输入Please build me就会触发jenkins job,我这里同时触发2个jenkins job
更多推荐
已为社区贡献27条内容
所有评论(0)