-
Notifications
You must be signed in to change notification settings - Fork 651
Dockerfile giving null reference exception? #1441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you try adding a global.json to your solution and pin the sdk version to 2.0.0. We havent merged support for dotnet sdk > 2.0.0 yet and i have a feeling perhaps the base docker image has now moved on to having dotnet sdk 2.1 installed despite being called 2.0 |
I can do that, but I'm not certain where to put it, since I don't have a solution folder or anything. I'm using this to version the AMIs I'm building using Packer. Do I put it at the root of the repository? |
@yamikuronue ignore me. I was confusing the issue, assuming it was a build issue but its nothing to do with dotnet build. You are just mounting the repo into the container and calling gitversion cli against it. The stack trace looks like gitversion has a problem inspecting the repo when looking at the branch for some reason. If you are using team city have you read the gitversion docs team city section which mentions about checkout mode (i.e server / agent) - I wonder if your repo isn't being initialised by team city in a state that gitversion can work with (complete guess) |
Yeah, I set it to "fetch all heads" which I would assume gets the full repo state (using the optional property |
I do spy |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
Can you check your Version Control Settings on TeamCity? When enabling Anyways, we've had issues with this, when mounting the checkout directory into a container with GitVersion. The solution is then to disable I wonder if it would be possible for GitVersion to identify and report this issue when it happens. The current error messages are not very helpful. I have had quite a few colleagues run into this issue, and spending quite a lot of time scratching their heads. For comparison, here's how it looks on our agents, when mirrors is in use and the build starts to break:
This is using version 5.0 of GitVersion in Docker. |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
I am attempting to capture the correct image number so it can be baked into Packer when building my AMIs. I am using the following partial build.sh to capture that information in an environment variable so I can pass it along to Packer:
I am running this on a linux agent in teamcity (the current teamcity plugin requires Powershell apparently). I am building on a branch in a repo, it's a fairly new repo so there's nothing weird going on. I am getting the following output:
(the capture of the output may be wrong too, but at the moment I'm mostly concerned with the error it's throwing).
What have I done wrong here? I have set it to fetch all heads, so shouldn't it have all the info it needs?
The text was updated successfully, but these errors were encountered: