Parameter substitution in VCS 'Pull changes from'

TeamCity, 8.1.4, server is on linux, agents on windows.

We are trying to use a system parameter for our Mercurial/Hg 'Pull Change from' location (due to the different os paths)
It seems like the substitution does not occur.  I can set it is set from the diagnostics->internal properties tab.

When clicking Test on the vcs root, we get:

Test connection failed in Product-Test 29 :: Release. 'hg --config ui.interactive=False identify %system.VCS_ROOT_DIR%/Products/test' command failed.
stderr: abort: repository %system.VCS_ROOT_DIR%/Products/eopen not found!

Have tried with both environment and system properties.
Is this a know issue, or are we doing something wrong?

Thanks.
Scott

5 comments
Comment actions Permalink

Hi,

Build Configuration Parameters can be used in VCS root URLs. In your case it was not resolved because you use internal properties which are Java properties, not TeamCity Build Configuration Parameters. Please set %system.VCS_ROOT_DIR% parameter on the Parameters page of Build Configuration or Project settings or in <Agent home>/conf/buildAgent.properties file on agent.

0
Comment actions Permalink

Once I set the the build configuration parameter, it doesn't seem to be overriden by the agent.
For example, I need the server to be /mnt/vcs, but I need the agent to be \\server1\vcs

Once I set the the build configuration parameter to /mnt/vcs, the value defined in the build agent conf seems to be ignored.

Thanks.
Scott

0
Comment actions Permalink

The parameters can be defined at different levels (in order of precedence):

  • in a specific build (via Run Custom Build dialog)
  • Build Configuration settings
  • Project settings
  • Agent (<Agent home>/conf/buildAgent.properties file on agent)

So Build Configuration parameters override Build Agent conf setting. To use different value on different agent you need to add parameter to buildAgent.properties file on each agent.

0
Comment actions Permalink

We have tried that with both Configuration Parameters and System Properties.
It works on the server (ie, the Test button works), but the build fails trying to checkout.
It seems like the substitution is happenining on the server, not on the agent.
We are doing a checkout mode of 'Automatically on agent' if that matters.

So, just to be clear.
I went to my root project, parameters, added a system property of system.VCS_ROOT_DIR.
In the vcs root, used that %system.VCS_ROOT_DIR%.
The test button works and reports successfull connection.
Went to the agent, edited the buildAgent.properties, added system.VCS_ROOT_DIR=c:\thepath
Restarted the agent service.
The build fails and the error indicates it is still using the value defined by the server.

Repeated this entire process using 'Configuration Parameters' instead of 'System Properties'.
Same result.

Thanks.
Scott

0
Comment actions Permalink

Hi,

I discovered that agent properties are not resolved in VCS root settings. I've created the issue, please watch/vote for it.

0

Please sign in to leave a comment.