TeamCity Repository doesn't have any commit - need to support object/info/alternates
See original GitHub issueI’m having trouble getting the latest beta to work from TeamCity https://github.com/ctaggart/SourceLink/issues/359 . TeamCity is simply delegating to run the build from the official docker image. I’m create the standard CI environment variables.
I’ve set the Standard CI environment variables:
[1:11:50][Step 1/1] STANDARD_CI_REPOSITORY_TYPE: git
[21:11:50][Step 1/1] STANDARD_CI_REPOSITORY_URL: git@github.ecorp.test:taggac/vsphere-automation-sdk-.net.git
[21:11:50][Step 1/1] STANDARD_CI_SOURCE_REVISION_ID: 2faeb58bbe59b000c517f7c19e53fc371b10324e
1:12:38][Step 1/1] /root/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-63105-01/build/Microsoft.Build.Tasks.Git.targets(36,5): warning : Repository doesn't have any commit, the source code won't be available via source link. [/build/VMware.vSphere.Management/VMware.vSphere.Management.csproj]
[21:12:38][Step 1/1] /root/.nuget/packages/microsoft.sourcelink.common/1.0.0-beta-63105-01/build/Microsoft.SourceLink.Common.targets(73,5): warning : No SourceRoot items specified - the generated source link is empty. [/build/VMware.vSphere.Management/VMware.vSphere.Management.csproj]
[21:14:43][Step 1/1] VMware.vSphere.Management -> /build/VMware.vSphere.Management/bin/release/netstandard2.0/VMware.vSphere.Management.dll
The sourcelink json ends up being {"documents":{}}
, so it did not work.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (9 by maintainers)
Top Results From Across the Web
git describe within docker
We are generating an header file containing git version information using "git describe" within a docker container build. The problem is that ...
Read more >TeamCity with BitBucket Cloud Commit Status Publisher. ...
It seems that the issue is that there is no user dedicated for the build itself. **You are unable to use deployment keys...
Read more >Installing GitHub Webhooks from TeamCity
Unfortunately, installation and configuration of commit hooks is not an easy task and for on-premises VCS repositories it requires administration skills.
Read more >10 things I hate about Git - Steve Bennett blogs
Git doesn't provide any useful subsets – every command soon requires another; even simple actions often require complex actions to undo or ...
Read more >Public git repository for testing. Check if vulnerability alerts a
Public git repository for testing. Check if vulnerability alerts are enabled for a repository. To the right of the Filters drop-down menus, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The root cause of this is that the TeamCity uses git
object/info/alternates
to speed up clones. These are basically links to files elsewhere. The Docker process needed access to these.git log -3
would fail from inside the docker container with:The solution I used was to simply mount it readonly at the same location:
Any advantages of settings the STANDARD_CI variables? Is the main benefit that it set
DeterministicSourcePaths
like we saw in https://github.com/JamesNK/Newtonsoft.Json/pull/1746#issuecomment-400019582 ?I don’t know how to detect the condition. It seems indistinguishable from empty repository.