使用持续集成构建标签
我如何建立持续集成标签而不是分支的实践?
我有以下标签存储库目录结构(这里是更多存储库结构的详细说明):
/tags
/builds
/PA
/A
/B
/releases
/AR
/BR
/RC
/ST
我想配置我的持续集成工具(它可以是从 CruiseControl、Hudson 和 Jenkins 到 TeamCity 的任何工具)来构建最新标签(如果它是在这两个文件夹中创建的)。
例如,如果结构发生变化并且标签1.x.0
出现在PA
目录中,我想触发在1.x下构建源代码。 0
标签:
/tags
/builds
/PA
/1.x.0 -> triggers build
/A
/B
/releases
/AR
/BR
/RC
/ST
是否可以使用任何现有的持续集成工具在标签下构建源代码,或者我应该为此目的编写自己的插件?
How could I establish practice of continuously integrating tags instead of branches?
I have following structure of tags repository directory (here is more detailed explanation of the repository structure):
/tags
/builds
/PA
/A
/B
/releases
/AR
/BR
/RC
/ST
I would like to configure my continuous integration tool (it could be anything from CruiseControl, Hudson and Jenkins to TeamCity) to build latest tag if it has been created in either of those folders.
For example, if structure has changed and tag 1.x.0
has appeared in PA
directory, I want to trigger building of source code under 1.x.0
tag:
/tags
/builds
/PA
/1.x.0 -> triggers build
/A
/B
/releases
/AR
/BR
/RC
/ST
Is it possible to build source under tags with any of the existing continuous integration tools or I should write my own plugin for that purpose?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 Jenkins:使用定期作业检查新标签,然后使用 参数化触发插件以标签作为参数来开始您的工作。该作业将手动更新到标签并构建。
With Jenkins: use a periodic job to check for new tags, then use the Parametrized Trigger Plugin to kick off your job with the tag as a parameter. The job will manually update to the tag and build.
使用 Jenkins (Hudson) 和 Subversion,您可以拥有一个恒定的标签,例如
tags/BUILD
。当带有标签的任何内容发生变化时,Jenkins 将基于该标签进行构建。然后,您可以要求它在构建后应用新标签。在您的示例中,您可以创建一个新标签作为
tags/builds/PA
并让 Jenkins 监听该标签。 Jenkins 将检测tags/builds/PA
文件夹中的任何更改,并在检测到任何更改时进行构建。您可以配置构建后步骤以在完成构建时创建新标签 (1.x.0)。我就该主题发布了类似的问题,并在这里得到了一些答复 - http://groups.google.com/group/jenkinsci-users/browse_thread/thread/59ca7f0f9e21a382/fe14fc7269611b26#fe14fc7269611b26
With Jenkins (Hudson) and Subversion you can have a tag that is constant e.g
tags/BUILD
. When anything with the tag changes, Jenkins will build based on that tag. You can then ask it to apply a new tag after the build.In your example, you can create a new tag as
tags/builds/PA
and have Jenkins listen to that tag. Jenkins will detect any changes in thetags/builds/PA
folder and will build if it detects any changes. You can configure a post build step to create a new tag (1.x.0) when it completes the build.I posted a similar question on the topic and got some responses here - http://groups.google.com/group/jenkinsci-users/browse_thread/thread/59ca7f0f9e21a382/fe14fc7269611b26#fe14fc7269611b26