我想根据带有项目名称和状态的 jenkins build 更改工作流状态
i want to change workflow status based on jenkins build with project name and status
我想根据带有项目名称和状态的 jenkins build 更改工作流状态。谁能帮我解决这个问题。我可以执行以下操作:使用 story-id
def transitionInput = [transition: [id: '41']]
jiraTransitionIssue idOrKey: 'MSDP-198', input: transitionInput, site: 'JIRA'
但我需要根据项目名称和状态列出故事 ID
成功{
脚本{
def searchResults = jiraJqlSearch jql: "PROJECT = 'MSDP' and status = 'READY FOR STAGING DEPLOYMENT' and type = 'Story'", site: 'JIRA'
def issues = searchResults.data.issues
for (i = 0; i <issues.size(); i++) {
def result = jiraGetIssue idOrKey: issues[i].key, site: 'JIRA'
def transitionInput = [transition: [id: '41']]
def statuses = jiraGetProjectStatuses idOrKey: 'MSDP', site: 'JIRA'
responce = jiraTransitionIssue idOrKey: issues[i].key, input: transitionInput, site: 'JIRA'
}
}
} }
我想根据带有项目名称和状态的 jenkins build 更改工作流状态。谁能帮我解决这个问题。我可以执行以下操作:使用 story-id
def transitionInput = [transition: [id: '41']]
jiraTransitionIssue idOrKey: 'MSDP-198', input: transitionInput, site: 'JIRA'
但我需要根据项目名称和状态列出故事 ID
成功{ 脚本{
def searchResults = jiraJqlSearch jql: "PROJECT = 'MSDP' and status = 'READY FOR STAGING DEPLOYMENT' and type = 'Story'", site: 'JIRA'
def issues = searchResults.data.issues
for (i = 0; i <issues.size(); i++) {
def result = jiraGetIssue idOrKey: issues[i].key, site: 'JIRA'
def transitionInput = [transition: [id: '41']]
def statuses = jiraGetProjectStatuses idOrKey: 'MSDP', site: 'JIRA'
responce = jiraTransitionIssue idOrKey: issues[i].key, input: transitionInput, site: 'JIRA'
}
}
} }