我的问题陈述是,在JIRA工作流程中,如果将故事从审阅状态转移到完成状态,我必须触发调用Jenkins管道的webhook。但同样条件是它应该只在故事是Dev的情况下触发这个管道。如果故事与研究/ POC / AnyOther相关,则不应调用webhook。
As in the image it shows that story will move from review to done with transition state name "DONE"
现在处于相同过渡状态的post函数我希望触发post函数,如果故事本质上是dev,则调用Jenkins管道。 如何使用任何免费插件实现此目的?
答案 0 :(得分:0)
您的故事示例:
def jiraProjectKey = "PROJECT_KEY"
def version = "dev"
def jqlQuery = "project = ${jiraProjectKey} and fixVersion = '${version}' and status = 'Review'"
def workflowAction = "Move to Done"
step([$class: "JiraIssueUpdateBuilder",
jqlSearch: "${jqlQuery}",
workflowActionName: "${workflowAction}",
comment: "${comment}"])