-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins 2.48; Github Issues plugin 1.2.2
Attempting to use this plugin within a pipeline, I get the following exception:
java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowRun cannot be cast to hudson.model.AbstractBuild at org.jenkinsci.plugins.githubissues.GitHubIssueNotifier.perform(GitHubIssueNotifier.java:139) 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:473) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
The pipeline script is:
node {
try {
sh "ls 1234"
}
finally {
step([$class: 'GitHubIssueNotifier',
issueAppend: true, issueBody: '''
Build \'$JOB_NAME\' has failed!
Last 50 lines of output:
```
${OUTPUT, lines=50}
```
[View full output]($BUILD_URL)''',
issueLabel: 'Urgency-High',
issueRepo: '<a repo>',
issueTitle: '$JOB_NAME $BUILD_DISPLAY_NAME failed'])
}
}