Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67971

Not able to pass JIRA ticket ID as parameter.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • jira-plugin
    • None

      Hi All,

      I am trying to add comment in JIRA after every successful build in Jenkins pipeline. If I hardcode the value of issueKey, it is working and comment is getting updated. But when I pass it as a parameter , it is not working.It is not showing any error on build logs.Kindly suggest. I have pasted the snippet below.

      Working Snippet:

      jiraComment body: '"Build is success"', issueKey: 'JJ-3'

      Not working snippet:

      jiraComment body: '"Build is success"', issueKey: "${Jira_Tick}"

       

      Build Logs:
      [Pipeline] jiraSendBuildInfojiraSendBuildInfo: SUCCESS_BUILD_ACCEPTED: Successfully sent build information to Jira: onlinethree.atlassian.net. Accepted builds: [BuildKeyResponse\{pipelineId='Integ_Jenkins_Jira_Integration_Test', buildNumber=56}].[Pipeline] jiraComment[Pipeline] }[Pipeline] // node[Pipeline] }[Pipeline] // stage
       

      Plese note:

      We are able to send build logs to the respective Jira by passing branch parameter as a variable. PFB.

      variable used:

      Jira_url='our URL'

      jiraSendBuildInfo branch: "${Jira_url}", site: 'onlinethree.atlassian.net'

       

       

            Unassigned Unassigned
            vijaysankaranr vijay sankaran R
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: