Debugging VCS issues on move to git
Hi,
We are just in the process of moving from svn to git. We have created a git repository with the same code and I have created a copy of a build configuration in team city to try and get it working with git instead. I have managed to set up access using an SSH key which successfully tests, but when I try to run the build, no code gets copied to the build agent work directory and the first compile step fails as a a result. How can I debug this issue to find out where I have misconfigured something?
We are using TeamCity 9.1.1 (build 37059)
I can provide some log files but I'd prefer not to do it publicly as I would have to redact them first.
Thanks,
Sam
Please sign in to leave a comment.
Hello Sam,
What checkout mode do you use? Have you attached new VCS root to a build configuration?
We do not have any additional DEBUG log here. But if TeamCity starts to execute build step - check out was successful according to specified settings.
It would be much easier to help you with the problem if you attach build log here. I need only logs, related to checkout stage of a build.
Hi Nadia,
Thanks for looking into this.
I have attached a new VCS root to the build config, and it is using:
Checkout mode = Automatically on Server
Checkout Directory = Auto (recommended)
Clean Build = true (I have tried both options here)
A slightly redacted build log is below:
[09:55:41]Collecting changes in 1 VCS root
[09:55:41][Collecting changes in 1 VCS root] VCS Root details
[09:55:41][VCS Root details] "repository" {instance id=82, parent internal id=6, parent id=Greensense_repository, description: "ssh://gitserver:7999/gv/repository.git#refs/heads/master"}
[09:55:42]Clearing temporary directory: F:\TeamCity\buildAgent\temp\buildTmp
[09:55:42]Publishing internal artifacts
[09:55:42][Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[09:55:42][Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[09:55:43]Will perform clean checkout
[09:55:43]Clean checkout reasons
[09:55:43][Clean checkout reasons] Agent doesn't have any version of the project sources
[09:55:43][Clean checkout reasons] Checkout directory is empty or doesn't exist
[09:55:43]Transferring cached clean patch for VCS root: repository
[09:55:43]Using vcs information from server. Reason: no revision information for build configuration "Build dotnet packages from repository (bitbucket) - Test Only" and checkout directory F:\TeamCity\buildAgent\work\6fb9ccb90b57c5 on agent
[09:55:43]Checkout directory: F:\TeamCity\buildAgent\work\6fb9ccb90b57c5
[09:55:43]Repository sources transferred
[09:55:43]Removing F:\TeamCity\buildAgent\work\6fb9ccb90b57c5
[09:55:43]Updating sources: server side checkout
The first time I ran the build, it took 8 minutes to run (presumably getting the code from the remote repo). Now it takes only a few seconds. The log from that execution is below:
[15:16:11]Collecting changes in 1 VCS root
[15:16:11][Collecting changes in 1 VCS root] VCS Root details
[15:16:11][VCS Root details] "repository" {instance id=82, parent internal id=6, parent id=Greensense_repository, description: "ssh://gitserver:7999/gv/repository.git#refs/heads/master"}
[15:16:13]Clearing temporary directory: F:\BuildAgent\temp\buildTmp
[15:16:13]Publishing internal artifacts
[15:16:13][Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[15:16:13][Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[15:16:13]Checkout directory: F:\BuildAgent\work\6fb9ccb90b57c5
[15:16:13]Updating sources: server side checkout (8m)
[15:16:13][Updating sources] Using vcs information from server. Reason: no revision information for build configuration "Build dotnet packages from repository (bitbucket) - Test Only" and checkout directory F:\BuildAgent\work\6fb9ccb90b57c5 on agent
[15:16:13][Updating sources] Will perform clean checkout
[15:16:13][Updating sources] Clean checkout reasons
[15:16:13][Clean checkout reasons] Agent doesn't have any version of the project sources
[15:16:13][Clean checkout reasons] Checkout directory is empty or doesn't exist
[15:16:13][Updating sources] Building and caching clean patch for VCS root: repository
[15:24:13][Updating sources] Transferring cached clean patch for VCS root: repository
[15:24:13][Updating sources] Repository sources transferred
[15:24:13][Updating sources] Removing F:\BuildAgent\work\6fb9ccb90b57c5
Sam, could you please create an issue in our bug tracker. Provide there the full build log, teamcity-agent.log and teamcity-vcs.log (you can make attached files visible only for the teamcity-developers group).
Also, please attach created patch file (how to save it you can read in our documentation).
Hi Nadia,
I have created an issue here:
https://youtrack.jetbrains.com/issue/TW-50343
Thanks,
Sam
Hello Sam,
Thank you for creating an issue. We will look at it and will keep you informed.