-
Bug
-
Resolution: Fixed
-
Blocker
-
Jenkins ver. 2.150.1, Centos OS
jira-plugin 3.0.6
I have setup the 3.0.6 version of Jira plugin for jenkins with my jenkins instance. I am having issue with "Create jira issue" upon job failure.
Below is the error i am getting (from Console Output)
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:202) at hudson.plugins.jira.JiraCreateIssueNotifier.currentBuildResultFailure(JiraCreateIssueNotifier.java:357) at hudson.plugins.jira.JiraCreateIssueNotifier.perform(JiraCreateIssueNotifier.java:157) 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:1843) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Build step 'JIRA: Create issue' marked build as failure Finished: FAILURE
Need urgent help to fixing it.
Regards
Sachin Gahlawat
- is related to
-
JENKINS-62638 [JIRA Server] Issue not created when Jenkins build fails
-
- Closed
-
- relates to
-
JENKINS-62638 [JIRA Server] Issue not created when Jenkins build fails
-
- Closed
-
Am experiencing the same issue with null pointer exception, its inconsistent in creating the issues in Jira .
Work Around:
Curl command works fine in create issue in Jira , make sure about your mandatory Jira fields and add them to txt file .
curl -
D- -u username:password -X POST --data-binary "@/<path to TXT file>/abc.txt" -H "Content-Type: application/json" https://*<JIRA_BASEURL>*/rest/api/2/issue/{
"fields": {
"project":
{ "key": "abc" },
"summary": "Sample Test ticket from Jenkins.",
"description": "Creating of an issue using project keys and issue type names using the REST API",
"issuetype":
{ "name": "Task" },
"customfield_10002":
{ "id": "1" },
"components":[\{"name":"Jenkins"}],
"assignee" :
{ "name" : "abc" }}
}