JIRA与Jenkins 集成 (一)

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)

  1. Go to JIRA Administration> System > WebHooks (Requires admin permission)
  2. Create a new Webhook: Set URL to: ${Jenkins
    URL}/jira-trigger-webhook-receiver/ e.g.
    http://localhost:8080/jenkins/jira-trigger-webhook-receiver/
  3. Enable issue updated event
  4. If you are on JIRA Cloud, enable comment created event
  5. Do not check Exclude body as this plugin requires the JSON to operate
  6. Save!

Jenkins 配置

Jenkins global configuration (One time)
This configuration is crucial, especially for JQL filter usage.

  1. Go to Jenkins global configuration (${Jenkins URL}/configure)
  2. Configure JIRA Trigger Configuration
    JIRA与Jenkins 集成 (一)

Jenkins Job 配置

Comment trigger
JIRA与Jenkins 集成 (一)
Changelog trigger
JIRA与Jenkins 集成 (一)

上一篇:如何使用JIRA python API将观察者添加到JIRA票证


下一篇:用Python和Rest查询Jira