Windows build agent (and Perforce?) problems after TeamCity 3.0.1 upgrade

Hi,

I upgraded TeamCity from 2.1.1 to 3.0.1 yesterday. Since then, none of the builds that run on the Windows build agent run successfully. The server is on a Red Hat box and the SCM is Perforce 2005.2.

It appears from the log errors, that there are 2 problems:
1) TeamCity no longer recognizes an env variable: WORKSPACES_ROOT
2) The build root is being appended to the location where the wrapper script starts.

A bit more info:
- I upgraded the build agent as specified in the online documentation.
- The build is set to automatically update from server.
- I have stopped/started the Windows service & the TeamCity server multiple times.
- The buildAgent.properties file on the Windows build agent contains:
workDir=C\:
workspaces
env.WORKSPACES_ROOT=C\:
workspaces
- I tried adding this to the buildAgent.properties:
teamcity.build.checkoutDir=C\:
workspaces
and then commented it out when it didn't work.

Build log:
: bt82
: Checking for changes
: Building in C:\BuildAgent\bin\%env.WORKSPACES_ROOT%\services\orangegourmet
: Clearing temporary directory: C:\temp\buildTmp
: Getting project sources
: Loading changed files from server...
: Updating C:\BuildAgent\bin\%env.WORKSPACES_ROOT%\services\orangegourmet
: jetbrains.buildServer.RunBuildException: java.io.IOException: Cannot find build file by path specified in build configuration settings: 'C:\BuildAgent\bin\%env.WORKSPACES_ROOT%\services\orangegourmet\build.xml' (absolute path on agent). Please check that specified path is correct.
jetbrains.buildServer.RunBuildException: java.io.IOException: Cannot find build file by path specified in build configuration settings: 'C:\BuildAgent\bin\%env.WORKSPACES_ROOT%\services\orangegourmet\build.xml' (absolute path on agent). Please check that specified path is correct.
at jetbrains.buildServer.agent.runner.GenericProgramRunner.run(GenericProgramRunner.java:113)
at jetbrains.buildServer.agent.impl.BuildAgentImpl$BuildRunAction.startRunner(BuildAgentImpl.java:1198)
at jetbrains.buildServer.agent.impl.BuildAgentImpl$BuildRunAction.runActualBuild(BuildAgentImpl.java:1188)
at jetbrains.buildServer.agent.impl.BuildAgentImpl$BuildRunAction.run(BuildAgentImpl.java:1129)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Cannot find build file by path specified in build configuration settings: 'C:\BuildAgent\bin\%env.WORKSPACES_ROOT%\services\orangegourmet\build.xml' (absolute path on agent). Please check that specified path is correct.
at jetbrains.buildServer.runner.BuildFileRunnerUtil.getBuildFile(BuildFileRunnerUtil.java:55)
at jetbrains.buildServer.agent.ant.AntBuildRunner.getBuildFile(AntBuildRunner.java:150)
at jetbrains.buildServer.agent.ant.AntBuildRunner.getProgramParameters(AntBuildRunner.java:88)
at jetbrains.buildServer.agent.runner.JavaProgramRunner.buildCommandLine(JavaProgramRunner.java:83)
at jetbrains.buildServer.agent.runner.GenericProgramRunner.run(GenericProgramRunner.java:98)
... 4 more

: Publishing artifacts
: Will process paths:
: Publishing artifacts 'war/*.war' to root artifacts directory
: Artifacts path war/*.war not found
: Publishing artifacts 'teamcity-info.xml' to root artifacts directory
: Artifacts path teamcity-info.xml not found
: Build finished

An additional oddity is that it seems to want to publish 'teamcity-info.xml' as an artifact.
Not sure why since it is not specified as an artifact anywhere.

Has anyone experienced any of these problems and/or have a solution?

Thanks,
-Dave

2 comments

I believe this problem should be resolved by removing environment variable WORKSPACES_ROOT with value %env.WORKSPACES_ROOT% from the build configuration.

Regards,
KIR

0

I believe this problem should be resolved by removing
environment variable WORKSPACES_ROOT with value
%env.WORKSPACES_ROOT% from the build configuration.


The solution that seemed to work was to remove the WORKSPACES_ROOT variable in the
agent's buildAgent.properties file then hardcode the value of WORKSPACES_ROOT in the
build config. After that, I can use %env.WORKSPACES_ROOT% other places in the build
config.

0

Please sign in to leave a comment.