im using teamcity 9.1.4 and octopack 3.4.7 in my helloworld mvc app. I have octopus 3.4.9. So when i select run octopack from the msbuild step and then use the octopus deploy everything works. The issue is that I can’t get a version number to apply to the nupkg . my artifact just keeps coming out as OwnerReviews.WebApi.1.0.0.0.nupkg even though my %build.number% is 1.0122.30 .
When i add %build.number% to the OctoPack package version I end up with the msbuild step crashing as it seems to suddenly try and push to octopus…even though the server and handshake are correct.
This step seems to insert when i add the package version but blows up.
:49][Exec] "F:\JetBrains\TeamCity\buildAgent\work\xx\HelloWorld\packages\OctoPack.3.4.7\tools\NuGet.exe"
push "F:\JetBrains\TeamCity\buildAgent\work\xx\HelloWorld\HelloWorld.WebApi\obj\octopacked\HelloWorld.WebApi.1.0122.53.nupkg"
API-xxddxxdsfddf -Source https://octopus.ci.mydomain.ca
[19:27:50][Exec] NuGet Version: 3.5.0.38733 (Custom build for OctoPack. See http://g.octopushq.com/VersioningInOctopusDeploy)
[19:27:51][Exec] Pushing HelloWorld.WebApi.1.0122.53.nupkg to ‘https://octopus.ci.mydomain.ca’…
[19:27:51][Exec] PUT https://octopus.ci.mydomain.ca/api/v2/package/
[19:27:54][Exec] NotFound https://octopus.ci.mydomain.ca/api/v2/package/ 3429ms
[19:27:54][Exec] Response status code does not indicate success: 404 (Not Found).
[19:27:54][Exec] F:\JetBrains\TeamCity\buildAgent\work\xx\HelloWorld\packages\OctoPack.3.4.7\tools\OctoPack.targets(108, 5):
error MSB3073: The command ""F:\JetBrains\TeamCity\buildAgent\work\xx\HelloWorld\packages\OctoPack.3.4.7\tools\NuGet.exe"
push "F:\JetBrains\TeamCity\buildAgent\work\xx\HelloWorld\HelloWorld.WebApi\obj\octopacked\HelloWorld.WebApi.1.0122.53.nupkg"
API-xxddxxdsfddf -Source https://octopus.ci.mydomain.ca " exited with code 1.
The annoying thing is that I do end up having a successful build on the teamcity server. I can see the version is there and octopacked correctly. I can search for it on the octopus server and it is there. But because it keeps breaking the msbuild step, I can’t trigger the deploy.
Can someone explain what might be going on? I most definitely need to have build versions It seems this is the only way to get a version number onto the nupkg.
using the latest nuget 4.0 RC2, msbuild 2015/x86 platform.
Been dealing with this all night and can’t wrap my head around the problem.
PS: I dont have any artifact paths or anything similar setup as I just need Teamcity to do its thing and then deploy to octopus.
Thank you for any assistance or ideas you might have.