使用svn + ssh时,Teamcity中的参数化结帐规则会丢弃参数 [英] Parameterized Checkout Rules in Teamcity discards parameter when using svn+ssh

查看:55
本文介绍了使用svn + ssh时,Teamcity中的参数化结帐规则会丢弃参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Teamcity中设置参数化的版本时出现SVN + SSH问题.我的SVN布局是

Having a SVN+SSH issue with setting up a parameterized build in Teamcity. My SVN layout is

VCSRoot << VCS Root configured to point here
    trunk
        deployment_module
    tags
        tag_name1
             deployment_module
        tag_name2
             deployment_module
        ... etc

我将一个VCS根配置为上面指定的根.我的中继构建工作正常,并配置了以下签出规则:

I have one VCS root configured to the root specified above. My trunk build is working fine and is configured with the following checkout rule:

+:trunk/deployment_module => .

对于分支机构,我想建立一个带有参数的构建:%RELEASE_TAG%.然后,我可以使用该参数来修改签出规则并签出标记的版本.瞧!一种构建配置,许多标记构建!

For the branches, I wanted to set up a build that takes a parameter: %RELEASE_TAG%. I could then use that parameter to modify the checkout rule and checkout the tagged versions. Voila! One build configuration, many tag builds!

但是,它不起作用.

这是我针对参数化标记构建的当前结帐规则:

This is the current checkout rule I have for the parameterized tag build:

+:tags/%RELEASE_TAG%/deployment_module => .

当TC开始构建时,这会导致以下错误(例如,我提供了"1.5":

This causes the following error when TC starts the build (say for example I supplied "1.5":

Failed to collect changes, error: Error collecting changes for VCS repository      '"My_Repo" {instance id=12, parent internal id=1, parent id=My_Repo, description: "svn: svn+ssh://my_user_id@svn_ip/svn/repo/"}'
Checkout rule: tags/1.5/deployment_module=>tags/1.5/deployment_module
tags/deployment_module=>tags/deployment_module
Path is invalid: 'svn+ssh://my_user_id@svn_ip/svn/repo/tags/deployment_module'@321: none

我不是Teamcity专家,但似乎有两个运行的结帐规则,一个在另一个之上.一个包含并正确导入我的变量,然后一个丢弃它,这就是用于访问SVN的那个.

I'm no Teamcity expert, but it seems like there are two checkout rules running, one above the other. One contains and correctly imports my variable, then the one after discards it, and that's the one that is used in accessing SVN...

非常感谢你们可能提供的任何帮助或想法.

Would appreciate any help or ideas you guys might have.

谢谢!

推荐答案

我找到了一种解决方法,尽管它并不完美,但希望它可以帮助其他人解决此问题.

I've found a workaround, though it's not perfect, hopefully it can help others with this problem.

我没有使用带有参数化VCS规则的通用VCS根目录,而是为标签创建了单独的VCS根目录.

Instead of using a common VCS root with parameterized VCS rules, I made a seperate VCS root for tags.

使用以下参数指定根URL:

The root URL was specified with a parameter as follows:

svn+ssh://my_user_id@svn_ip/svn/repo/tags/%RELEASE_TAG%

然后我将VCS规则设置为:

Then I set a VCS rule as:

+: deployment_module => .

这有效,并允许结帐成功完成.将参数移出规则并移至VCS根目录似乎是关键.有点混乱,但是可以.

This worked, and allowed checkout to complete successfully. Moving the parameter out of the rule and into a VCS root seems to be the key. A bit messy, but it works.

这篇关于使用svn + ssh时,Teamcity中的参数化结帐规则会丢弃参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆