简体   繁体   English

将Jira Cloud与Jenkins集成

[英]Integration Jira Cloud with Jenkins

I want to integrate Jenkins with JIRA Cloud. 我想将Jenkins与JIRA Cloud集成。 I want Jenkins to start build job when i'm updating Issue Status in JIRA. 当我在JIRA中更新问题状态时,我希望Jenkins开始构建工作。

example: when the issue in jira is going from status IN PROGRESS to DEV COMPLETED, I want Jenkis to start a build. 例如:当jira中的问题从“进行中”状态变为“开发完成”时,我希望Jenkis开始构建。

regards, Maja 问候,玛雅

Usually the flow is a little bit different. 通常,流程略有不同。

  • After you done with the development you should add JIRA ticket number in commit. 完成开发后,您应该在提交中添加JIRA票证编号。
  • Then create pull request (if you use Git as VCS) and merge it to main branch. 然后创建拉取请求(如果您使用Git作为VCS)并将其合并到主分支。
  • Git server will trigger build on the Jenkins side (you should find Jenkins plugin for your case). Git服务器将在Jenkins端触发构建(您应该为您的案例找到Jenkins插件)。
  • After build is done there Jenkins can send update status to Jira (via Jenkins JIRA plugin 构建完成后,Jenkins可以将更新状态发送给Jira(通过Jenkins JIRA插件)

There are some variations. 有一些变化。 For example you want to allow merge only when build on Jenkins was successful. 例如,您只想在Jenkins上成功构建时才允许合并。 In this case JIRA update should be performed by Git service. 在这种情况下,JIRA更新应由Git服务执行。

Thank you for your fast response, but we got different situation than the given answer. 感谢您的快速回复,但我们遇到的情况与给出的答案有所不同。 I will try to explain clearly. 我会尽力解释清楚。 1. we got Jira on cloud that successfully communicate with Gitlab. 1.我们在云上获得了可以与Gitlab成功通信的Jira。 (there is a build in jenkins after commit in Jira) 2. and we got one test Jenkins on our local machine Jira is configured in Jenkins and we got all needed plugins in Jenkins. (在Jira中提交后在jenkins中进行了构建)2.我们在本地计算机上进行了一个测试Jenkins,Jira在Jenkins中配置,并且在Jenkins中获得了所有需要的插件。 Now we want, with every changed status on the issue in Jira (from IN PROGRESS to DEV COMPLETED), Jenkins to make an automatic build on the job. 现在,我们希望Jenkins在此问题上的每一个状态发生变化(从IN PROGRESS到DEV COMPLETED),都能自动完成工作。

Additionaly, Is there any Jenkins Plugin for Jira CLOUD that could help us? 另外,是否有任何Jira CLOUD的Jenkins插件可以帮助我们?

At this time, there is no Jenkins plugin / add-on for JIRA cloud, even though it is in high demand. 目前,即使需求很高,也没有针对JIRA云的Jenkins插件/附加组件。 It is rumored there may be one coming out in November / December 2017 as a beta. 有传言说可能会在2017年11月/ 12月发布一个beta版本。

If you are using Bitbucket, I'd recommend checking out Pipelines. 如果您使用Bitbucket,建议您检查管道。 Or, take a look at Bamboo or TeamCity as these tools integrate directly with JIRA Software Cloud. 或者,看看Bamboo或TeamCity,因为这些工具直接与JIRA Software Cloud集成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM