0
我想使用Jenkins Jira Steps Plugin創建新的Jira問題。如何使用Jenkins Jira Steps插件創建JIRA新問題
這裏是我的演示管道:
node {
stage('JIRA') {
def testIssue = [fields: [ project: [id: '1'],
summary: 'New JIRA Created from Jenkins.',
description: 'New JIRA Created from Jenkins.',
issuetype: [id: '11']]]
response = jiraNewIssue issue: testIssue, site: 'JIRA T'
echo response.successful.toString()
echo response.data.toString()
}
}
運行管道後,我得到:
[Pipeline] node
Running on master in /home/tomcat/.jenkins/workspace/Jira-RFC-Demo-Pipeline
[Pipeline] {
[Pipeline] stage
[Pipeline] { (JIRA)
[Pipeline] jiraNewIssue
JIRA: Site - JIRA T - Creating new issue: IssueInput(update=null, fields={project={id=1}, summary=New JIRA Created from Jenkins., description=New JIRA Created from Jenkins., issuetype={id=11}})
Error Code: 400
Error Message: {"errorMessages":[],"errors":{"project":"project is required"}}
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: {"errorMessages":[],"errors":{"project":"project is required"}}
Finished: FAILURE
所以它看起來像插件是無法讀取從testIssue項目。儘管如此,這應該是創建問題的方式,如上面的鏈接所述。
任何想法?