简体   繁体   English

JIRA 触发器 Webhook 不调用构建

[英]JIRA Trigger Webhook Not Invoking Build

I am using JIRA Trigger plugin for the first time and as per documentation , have configured Webhook on JIRA and have configured the Plugin on Jenkins.我是第一次使用 JIRA 触发器插件,根据文档,在 JIRA 上配置了 Webhook 并在 Jenkins 上配置了插件。

To start simple, I just used Create comment trigger, and provided the JQL entry along with environment variable mapping as per documentation.为了简单起见,我只使用了创建注释触发器,并根据文档提供了 JQL 条目以及环境变量映射。

Enabled the logger and can see data being posted from JIRA, but job never triggers.启用记录器并可以看到从 JIRA 发布的数据,但作业永远不会触发。 It's a simple pipeline job with below code :这是一个简单的管道工作,代码如下:

node {
    try {
      jiraIssueKey = 'TEST-1234'

   if ( env.JIRA_ISSUE_KEY && env.JIRA_ISSUE_KEY?.trim()) {
        jiraIssueKey = env.JIRA_ISSUE_KEY
     }

  jiraGetIssue idOrKey: "${jiraIssueKey}", site: 'JIRA'
} catch (e) {
   throw e
  }

}

Enabled the log to Finest level and data is coming through, but Job is not triggering.将日志启用到最佳级别并且数据正在通过,但作业未触发。

Please let me know if any further information is required.如果需要任何进一步的信息,请告诉我。

first thing first, did you set the logging in jenkins to see if any event is coming into your jenkins instance?首先,您是否在 jenkins 中设置了日志记录以查看是否有任何事件进入您的 jenkins 实例? As per the plugin's wiki: To troubleshoot: Enable Jenkins logging at FINE level for troubleshooting: com.ceilfors.jenkins.plugins.jiratrigger.webhook You should see "Received Webhook callback ..." log messages when Jenkins is receiving webhook events根据插件的维基:故障排除:在 FINE 级别启用 Jenkins 日志以进行故障排除:com.ceilfors.jenkins.plugins.jiratrigger.webhook 当 Jenkins 接收 Webhook 事件时,您应该看到“Received Webhook callback ...”日志消息

I was in trouble with same issue , What I noticed is if your Jenkins running behind a Apache proxy or something it will cause these issues.我遇到了同样的问题,我注意到如果您的 Jenkins 在 Apache 代理后面运行或会导致这些问题。

In jira Webhook configuration try putting your server name/ip instead of DNS name and even if Jenkins is on https , put http in webhook url, eg.在 jira Webhook 配置中,尝试放置您的服务器名称/ip 而不是 DNS 名称,即使 Jenkins 在 https 上,也将 http 放入 webhook url,例如。 below:下面:

http://servername/jira-trigger-webhook-receiver http://servername/jira-trigger-webhook-receiver

above resolved my issue and able to trigger builds now.以上解决了我的问题,现在能够触发构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM