简体   繁体   English

詹金斯(Jenkins):在项目发布时运行工作(通过执行Maven发布)

[英]Jenkins: run the job when the project was released( by performing a maven release)

I have defined a job, and I use Jenkins. 我已经定义了工作,并且使用了詹金斯。 I'm pretty new in it. 我很新。 Is it possible to set the job to run each time when the project was released? 是否可以将作业设置为在项目发布时每次运行?

Thank you. 谢谢。

There are a couple of ways of doing a Release vs non-release (daily, commit) build. 有一对夫妇的做一个发布版vs非释放的方式(每日,提交)的构建。

  1. Check out the functionality of the Release Plugin 查看发布插件的功能
  2. Use two different jobs. 使用两个不同的作业。 One for "normal" builds, one for Release builds. 一种用于“正常”构建,一种用于发行版本。

For the projects we are running here, we actually use #2 along with the Promoted Builds Plugin . 对于我们在这里运行的项目,我们实际上将#2与Promoted Builds Plugin一起使用。 Normal builds may be promoted to different states ( eg Integration, Verification). 正常构建可能会升级为不同状态( 例如,集成,验证)。 During the promotion, the built version of the code is tagged indicating the promotion. 在促销期间,将标记构建的代码版本以指示促销。 When it comes time to make a release build, only those source versions that have been promoted (and tagged) may be built into a Release. 当需要进行发布版本构建时,只有那些已经被提升(并标记)的源版本才可以构建到发布版本中。

由于我有svn标记,因此我决定使用svn标记(存储所有已发布版本的位置),因此我可以为已发布版本运行我的工作。

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

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