Subversion/TortoiseSVN 标记并指示 Jenkins 按标记构建
希望有人能为我澄清这一点
当前活动存储库 URL
在任何时候我都会使用多个存储库,因此我需要在多个存储库 URL 之间切换。如何更改当前活动存储库的 URL? 例如,我从存储库 A 签出文件,我会在 TortoiseSVN 客户端上指定存储库 A 的 URL。
然后,当我移动到另一个文件夹时,我想将新文件“添加”到另一个存储库(即存储库 B),我如何更改客户端以使其指向存储库 B?它似乎卡在存储库 A 的 URL 上。
标记
我熟悉 TortoiseCVS,通常当您使用 CVS/TortoiseCVS 标记文件夹时,它只是将标记(即标签)应用于文件。它不会在另一个文件夹中创建全新的副本。 TortoiseSVN/Subversion 似乎有所不同。标记文件夹/文件的选项似乎与分支有关。如果我创建一个标签,我会得到一些选项来指定我想要将分支复制到的位置。
这到底是如何运作的?我可以不只指定一个标签而不创建副本吗?我想要的只是应用一个标签(就像在 TortoiseCVS/CVS 中一样)
Jenkins - 按标签构建
是否可以指示 Jenkins 使用标签结账?我找不到任何有关如何配置 jenkins 以按标签签出和构建的信息。有很多关于如何在构建后配置 jenkins 进行标记的信息,但我对如何按标记构建(使用 subversion 存储库和 CVS 存储库)感兴趣。
谢谢
谢谢
Hopefully somebody can clarify this for me
Current Active Repository URLs
At any one time i would be using more than one repository so i need to switch between multiple repository URLs. How do i change the URL for the current active repository?
For example, i checkout files from repository A i would specify the URL to repository A on the TortoiseSVN client.
When i then move to another folder where i want to 'Add' new files to another repository i.e. repository B, how do i change the client so that it points to repository B? It seems to be stuck on repository A's URL.
Tagging
I am familiar with TortoiseCVS and usually when you tag a folder with CVS/TortoiseCVS, it just applies the tag (i.e. a label) to the files. It does not create a whole new copy in another folder. TortoiseSVN/Subversion seems to be different. The option to tag a folder/file seems to be related to branching. If i create a tag i get options to specify locations of where i want the branch to be copied to.
How exactly does this work? Can i not just specify a tag without creating a copy? All i want is just to apply a label (just like in TortoiseCVS/CVS)
Jenkins - Build by tag
Is it possible to instruct Jenkins to checkout using a tag? I cant find any information about how to configure jenkins to checkout and build by tag. There is a lot of information about how to configure jenkins to tag after a build but i am interested in how to build by tag (using both a subversion repository and a CVS repository).
Thanks
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只是想谈谈您的标记问题。不用担心 Subversion 标签的方式。它使用 svn copy 命令进行标记。这就是你所需要知道的。
Subversion 可以将树复制到
tags
目录下的目录,但它可以像 CVS 中的标签一样使用 - 存储库在特定时间点的快照,用易于记忆的标签标记标签。事实上,Subversion 标记在很多方面都更优越:
唯一的问题是标签无法锁定,因此人们可以查看标签并修改它们。但是,这可以通过预提交触发器来解决。
Jenkins
如果您在 Subversion 下已有 Jenkins 项目,则可以将 Jenkins 作业复制到新作业,并将 Jenkins 使用的 URL 修改为标签的 URL。在 Subversion 中,与 CVS 不同,检出标签、分支或主干没有什么区别:都只是某种 URL。
Just wanted to touch on your tagging issue. Don't worry about how Subversion tags. It tags with the
svn copy
command. That's all you have to know.Subversion may copy the tree to a directory under the
tags
directory, but it can be used just like a tag in CVS -- a snapshot of your repository at a specific point in time tagged by an easy to remember label.In fact, Subversion tagging is superior in many ways:
The only issue is that tags cannot be locked, so people can checkout tags and modify them. However, this can be solved with a pre-commit trigger.
Jenkins
If you already have a Jenkins project under Subversion, you can copy the Jenkins job to a new job, and modify the URL that Jenkins uses to the tag's URL. In Subversion, unlike CVS, there's no difference in checking out a tag, a branch, or from the trunk: It's all just a URL of some sort.
svn switch ^/branches/1.x-release
svn relocate http://www.example.com/repo/project svn://svn.example.com/repo/project
,因为 CI 中使用的操作顺序相反。标签(有条件地)是未修改的标签,标记一些“达到并测试的状态”,因此 - 我们在分支|主干中测试普通修订,并且标签仅恢复版本,测试后测试通过了我们的测试。同一代码上的另一个测试链不会对结果添加任何有用的内容
svn switch ^/branches/1.x-release
svn relocate http://www.example.com/repo/project svn://svn.example.com/repo/project
because inverted order of actions used in CI. Tags (conditionally) are unmodified labels, mark some "reached and tested state", thus - we test ordinary revisions in branch|trunk, and tags only reversions, passed our tests after tests. One more test-chain on the same code just add nothing useful to results