从 trunk 而不是 src 标记 jenkins
我们使用我们不想持续集成的应用程序存储库中的 src 目录路径创建 jenkins 作业。 (例如:https://svn.server.tld/trunk/src/app
但是当我们想要从构建中标记时,建议对整个路径进行标记,我们不希望从 https://svn.server.tld/trunk/
我们可以更改 URL 并使用包含区域(忽略存储库其他部分的提交),但是当 jenkins 签出时,它会检查整个存储库...不是很优化。
我看到 svn 只能检查一个目录(例如主干): http://svnbook.red-bean.com/nightly/ en/svn.advanced.sparsedirs.html 但是如何告诉詹金斯做这样的事情......
编辑:我们想要标记整个主干(即使有其他思考方式:在 svn 中标记部分树与完整树干),因为有一些规范(我们希望与源同时标记)在我们存储库的其他级别。
We create jenkins job using path to the src dir in the the respository of the app we wan't to integrate continuously. (For example : https://svn.server.tld/trunk/src/app
But when we want to tag from a build, the entire path is proposed to be tagged, we wan't to have the tag created from https://svn.server.tld/trunk/.
We can change the URL and use Included Regions (to ignore commit on other part of the repository), but when jenkins checkout, it will check out the entire repos... not very optimized.
I saw that svn is able to check out only one dir (trunk for instance) :
http://svnbook.red-bean.com/nightly/en/svn.advanced.sparsedirs.html
But how to tell jenkins to make such a thing...
Edit : we want to tag the entire trunk (even if there are other way of thinking : tag partial tree vs full trunk in svn ) because there are some specs (that we want to tagged at the same time than sources are) at other level on our repository.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Jenkins 为您提供Subversion 修订版号作为环境变量,并且您知道 trunk 的 URL。
下载构建后任务。然后,创建一个构建后任务来执行
svn cp
来标记版本。顺便说一句,确实没有理由在 Subversion 中标记每个构建。 Jenkins 跟踪存储库修订号,因此您始终可以从中分支,或从中创建生产版本。
Jenkins gives you the Subversion revision number as an environment variable, and you know the URL of the trunk.
Download the post-build task. Then, create a post-build task to do an
svn cp
to tag the release.By the way, there's really no reason to tag each and every build in Subversion. Jenkins tracks the repository revision number, so you can always branch from that, or create a production release from that.
还有一个 SVN 标记插件
There is also a SVN tagging plugin