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

Jira Create Issue Post Build Action is not working

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

      Hi I have downloaded the Jira Plugin, setup it (credentials were correct).

      Then I have setup Post Build Action and have chosen to create issue,

      But the issue is not created.

      I see in build logs:

       

      FAILURES!
      Tests: 9, Assertions: 26, Failures: 1.
      Script php ./vendor/phpunit/phpunit/phpunit handling the post-update-cmd event returned with error code 1
      Build step 'Execute shell' marked build as failure
      Finished: FAILURE

       

      Looks like the post build action was not attepted to run at all.

      Could you please help me?

          [JENKINS-64235] Jira Create Issue Post Build Action is not working

          Can you check if you see anything relevant in the debug logs when you turn on Jenkins debug logging?

          Radek Antoniuk added a comment - Can you check if you see anything relevant in the debug logs when you turn on Jenkins debug logging?

          OK I shall check it

          Alexey Dodonov added a comment - OK I shall check it

          I have created logger with log level ALL and filter "jira" and it shows nothing.

          And in the build log I see:

          Build step 'Execute shell' marked build as failure
          ERROR: Build step failed with exception
          java.lang.NullPointerException
          at hudson.plugins.jira.JiraSession.createIssue(JiraSession.java:413)
          at hudson.plugins.jira.JiraCreateIssueNotifier.createJiraIssue(JiraCreateIssueNotifier.java:210)
          at hudson.plugins.jira.JiraCreateIssueNotifier.currentBuildResultFailure(JiraCreateIssueNotifier.java:363)
          at hudson.plugins.jira.JiraCreateIssueNotifier.perform(JiraCreateIssueNotifier.java:165)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
          at hudson.model.Build$BuildExecution.post2(Build.java:186)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
          at hudson.model.Run.execute(Run.java:1919)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:97)
          at hudson.model.Executor.run(Executor.java:428)
          Build step 'Jira: Create issue' marked build as failure
          Finished: FAILURE

          Alexey Dodonov added a comment - I have created logger with log level ALL and filter "jira" and it shows nothing. And in the build log I see: Build step 'Execute shell' marked build as failure ERROR: Build step failed with exception java.lang.NullPointerException at hudson.plugins.jira.JiraSession.createIssue(JiraSession.java:413) at hudson.plugins.jira.JiraCreateIssueNotifier.createJiraIssue(JiraCreateIssueNotifier.java:210) at hudson.plugins.jira.JiraCreateIssueNotifier.currentBuildResultFailure(JiraCreateIssueNotifier.java:363) at hudson.plugins.jira.JiraCreateIssueNotifier.perform(JiraCreateIssueNotifier.java:165) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) at hudson.model.Run.execute(Run.java:1919) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) Build step 'Jira: Create issue' marked build as failure Finished: FAILURE

          Any comments?

          Alexey Dodonov added a comment - Any comments?

          Radek Antoniuk added a comment - - edited

          There is an NPE visible in the log. Can you check if "Validate" works fine in the Configuration screen?

          What's your plugin, jenkins and Jira version?

          Radek Antoniuk added a comment - - edited There is an NPE visible in the log. Can you check if "Validate" works fine in the Configuration screen? What's your plugin, jenkins and Jira version?

          I have pressed "Validate Settings" in the Jira plugin settings and it have shown "Success".

          Version of Jira - I use cloud version of Jira, so looks like it is the latest version of Jira.

          Version of Jira Plugin - 3.1.3

          Version of Jenkins - 2.249.3

          Alexey Dodonov added a comment - I have pressed "Validate Settings" in the Jira plugin settings and it have shown "Success". Version of Jira - I use cloud version of Jira, so looks like it is the latest version of Jira. Version of Jira Plugin - 3.1.3 Version of Jenkins - 2.249.3

            Unassigned Unassigned
            gdever Alexey Dodonov
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: