簡體   English   中英

使用svn + ssh時,Teamcity中的參數化結帳規則會丟棄參數

[英]Parameterized Checkout Rules in Teamcity discards parameter when using svn+ssh

在Teamcity中設置參數化版本時出現SVN + SSH問題。 我的SVN布局是

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

我將一個VCS根配置為上面指定的根。 我的中繼構建工作正常,並配置了以下簽出規則:

+:trunk/deployment_module => .

對於分支,我想建立一個帶有參數的構建: %RELEASE_TAG% 然后,我可以使用該參數來修改簽出規則並簽出標記的版本。 瞧! 一種構建配置,許多標簽構建!

但是,它不起作用。

這是我針對參數化標簽構建的當前結帳規則:

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

當TC開始構建時,這會導致以下錯誤(例如,我提供了“ 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的那個。

希望您能提供任何幫助或想法。

謝謝!

我發現了一種解決方法,盡管它並不完美,但希望它可以幫助其他人解決此問題。

我沒有為參數化的VCS規則使用通用的VCS根目錄,而是為標簽創建了單獨的VCS根目錄。

使用以下參數指定了根URL:

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

然后我將VCS規則設置為:

+: deployment_module => .

此方法有效,並允許結帳成功完成。 將參數移出規則並移至VCS根目錄似乎是關鍵。 有點混亂,但是可以。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM