如何在Jenkinsfile(jenkins-worflow/pipeline)中更新jira问题?有没有办法可以使用Jira Issue Updater插件作为Jenkinsfile中的一个步骤?
我知道我可以使用Jira RestAPI,但我想弄清楚是否可以重用jira-updater-issue提供的功能.
我正在寻找的是类似下面的示例,调用Junit归档器和atifact归档器,但调用jira更新程序.
node { git url: 'https://github.com/jglick/simple-maven-project-with-tests.git' def mvnHome = tool 'M3' sh "${mvnHome}/bin/mvn -B -Dmaven.test.failure.ignore verify" step([$class: 'ArtifactArchiver', artifacts: '**/target/*.jar', fingerprint: true]) step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml']) }
amuniz.. 9
在吉拉插件与管道兼容.
这应该工作:
step([$class: 'hudson.plugins.jira.JiraIssueUpdater', issueSelector: [$class: 'hudson.plugins.jira.selector.DefaultIssueSelector'], scm: [$class: 'GitSCM', branches: [[name: '*/master']], userRemoteConfigs: [[url: 'https://github.com/jglick/simple-maven-project-with-tests.git']]]])
您可以在内置的Pipeline Snippet Generator中获得完整的参考.
在吉拉插件与管道兼容.
这应该工作:
step([$class: 'hudson.plugins.jira.JiraIssueUpdater', issueSelector: [$class: 'hudson.plugins.jira.selector.DefaultIssueSelector'], scm: [$class: 'GitSCM', branches: [[name: '*/master']], userRemoteConfigs: [[url: 'https://github.com/jglick/simple-maven-project-with-tests.git']]]])
您可以在内置的Pipeline Snippet Generator中获得完整的参考.