我可以根据Jenkins版本更改JIRA问题状态吗



我可以根据Jenkins构建更改JIRA问题状态吗?通过jenkinsfile。请推荐

您可以使用Jira steps插件,也可以使用Jiraneneneba API。

例如,使用Jira步骤:

withEnv(['JIRA_SITE=your_site']) {
def issue_key = 'MY-12345'
def result = jiraGetIssue idOrKey: issue_key, failOnError:false
// you can now expore the issue
// when you want to change the status, it's called "transition"
def transition_to_closed_jira_id = 88 // you need to find out your ID

def transitionInput = [ transition: [ id: transition_to_closed_jira_id ] ]
jiraTransitionIssue idOrKey: issue_key, input: transitionInput

相关内容

  • 没有找到相关文章

最新更新