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

Github Issue plugin refuses to create issue on build failure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: github-issues-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.35, Windows. Using GitHub Enterprise.
    • Similar Issues:

      Description

      I am trying to run Github Issues plugin on my build and here is the exception that is reported in the build while attempting to create Github Issue:

      [ANALYSIS-COLLECTOR] Skipping publisher since build result is FAILURE
      Skipping Cobertura coverage report as build was not UNSTABLE or better ...
      ERROR: Build step failed with exception
      java.lang.ClassCastException: hudson.maven.MavenModuleSetBuild cannot be cast to hudson.model.Build
      	at org.jenkinsci.plugins.githubissues.GitHubIssueNotifier.perform(GitHubIssueNotifier.java:122)
      	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
      	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1067)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
      	at hudson.model.Run.execute(Run.java:1753)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:404)
      Build step 'Create GitHub issue on failure' marked build as failure
      Finished: FAILURE
      

        Attachments

          Activity

          lwiechec Lukasz Wiechec created issue -
          Hide
          daniel15 Daniel Lo Nigro added a comment -

          Interesting, I wonder if this is specific to Maven builds. I don't have much experience with Jenkins.

          Show
          daniel15 Daniel Lo Nigro added a comment - Interesting, I wonder if this is specific to Maven builds. I don't have much experience with Jenkins.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Lo Nigro
          Path:
          src/main/java/org/jenkinsci/plugins/githubissues/GitHubIssueNotifier.java
          http://jenkins-ci.org/commit/github-issues-plugin/32aea3f6f0971d3c9976a7fc58a75be1e679d619
          Log:
          Fix JENKINS-40385: Use AbstractBuild rather than Build so it works for Maven builds too

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Lo Nigro Path: src/main/java/org/jenkinsci/plugins/githubissues/GitHubIssueNotifier.java http://jenkins-ci.org/commit/github-issues-plugin/32aea3f6f0971d3c9976a7fc58a75be1e679d619 Log: Fix JENKINS-40385 : Use AbstractBuild rather than Build so it works for Maven builds too
          Hide
          daniel15 Daniel Lo Nigro added a comment -

          This was fixed in version 1.2.2 of the plugin.

          Show
          daniel15 Daniel Lo Nigro added a comment - This was fixed in version 1.2.2 of the plugin.
          daniel15 Daniel Lo Nigro made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              daniel15 Daniel Lo Nigro
              Reporter:
              lwiechec Lukasz Wiechec
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: