JIRA Trigger Webhook Not Invoking Build

1.6k views Asked by At

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.

To start simple, I just used Create comment trigger, and provided the JQL entry along with environment variable mapping as per documentation.

Enabled the logger and can see data being posted from JIRA, but job never triggers. 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.

2

There are 2 answers

1
OK999 On

first thing first, did you set the logging in jenkins to see if any event is coming into your jenkins instance? 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

0
Malacophonous On

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.

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. below:

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

above resolved my issue and able to trigger builds now.