title: How to add comment to Jira issue from Jenkins pipeline?
body: <p>I have a Jenkins job that is configured via a declarative pipeline script.</p>
  
  <p>I would like to add a comment to the related Jira issue when a build passes / fails.</p>
  
  <p>The plugins that are available don't give very good documentation with regards to using them with a pipeline.  I have tried to use the "Jira Plugin" as it is explained in this answer:</p>
  
  <p><a href="https://stackoverflow.com/questions/35213266/updating-jira-tickets-from-jenkins-workflow-jenkinsfile">Updating Jira tickets from Jenkins workflow (jenkinsfile)</a></p>
  
  <pre><code>step([$class: 'hudson.plugins.jira.JiraIssueUpdater', 
      issueSelector: [$class: 'hudson.plugins.jira.selector.DefaultIssueSelector'], 
      scm: [$class: 'GitSCM', branches: [[name: '*/develop']], 
          userRemoteConfigs: [[url: 'https://github.com/something.git']]]])
  </code></pre>
  
  <p>But I get this error:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Unsupported run type org.jenkinsci.plugins.workflow.job.WorkflowRun
  at hudson.plugins.jira.JiraIssueUpdater.perform(JiraIssueUpdater.java:69)
  at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:78)
  at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:65)
  at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
  at hudson.security.ACL.impersonate(ACL.java:260)
  at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p><strong>Has anyone successfully done this via the pipeline?</strong></p>