4/19/2023 0 Comments Teamcity upgradeIf you experience slow builds, the first thing to do is to check the build log to see if there are some long operations or the time is just spread over the entire process. Please attach all the build step settings, the build log, all agent logs covering the build, the command you used in the console to run the build and the full console output of the build. If the command line runner works but the dedicated runner does not while the options are all the same, create a new issue in our tracker detailing the case. If it still behaves differently in TeamCity, most probably this is an environment or a tool issue. If the build succeeds from the console but still fails in TeamCity, use a command line runner in TeamCity to launch the same command as in the console. Run the build in TeamCity selecting the agent in the Run custom build dialog For example, use the Command Line build step with the Custom script option and the same command which can be saved in a. In the same console window cd to /bin and start TeamCity agent from there with the agent start commandĮnsure the runner settings in TeamCity are appropriate and should generate the same command line as you used manually. If the build fails - investigate the reason as the issue is probably not TeamCity-related and should be investigated on the machine. (For some runners you can look up the command line used by TeamCity in the build log, see also the logs\teamcity-agent.log file for the command line used by TeamCity) Run the build with a command line as you would do on a developer machine. In a command line console, cd to the checkout directory of the build in question (the directory can be looked up in the beginning of the build log in TeamCity) Log in to the agent machine using the same user as the one running the TeamCity agent (check the right user in the machine processes list) This can be done while the build is still in progress Run the build in TeamCity and see it misbehavingĭisable the agent so that no other builds run on it. Here are the detailed steps you can use to run a build from the command line.Īssuming you have a configured build in TeamCity which is failing, do the following: Also, you can set up the TeamCity agent to be run from the console all the time (for example, configure an automatic user logon and run the agent on the user logon). Most often this is service-specific and is not related to TeamCity directly. If this fixes the issue, you can try to figure out why running under the service is a problem for the build. If the TeamCity build agent is run as a service (for example, it is installed as a Windows service), try running the TeamCity agent under a regular user with administrative permissions from the command line. If that works, try another runner if that feels applicable.Ĭheck that the build runs fine from the command prompt when run on the same machine as the TeamCity agent and under the same user that the agent is running, with the same environment variables and the same working directory, same architecture (32/64 bit) command line. ![]() When the command runs OK, configure the same command in a TeamCity build using the Command Line runner with the custom script setting. If necessary, run the TeamCity agent under a different user or tweak its environment. Make sure it works on the TeamCity agent machine, under the same user as the TeamCity agent runs under, with the same environment the agent receives. If a build fails or otherwise misbehaves in TeamCity but you believe it should not, the first thing to do is to check whether the issue is related to TeamCity or not.įind a way to run the task from a command prompt. Before reporting your problem, check if any of these Help pages contains the solution already:īuild works locally but fails or misbehaves in TeamCity Most user issues are related to the following topics.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |