There is a known problem that if you deploy during a TeamCity build, a previous version will be deployed (as the current will be available only after the build is finished).
Documentation suggests creating a secondary TeamCity BuildConfiguration as a workaround but it sucks and seems not to work anymore (there is a number of bug reports about it).
There was an alternative solution suggested in the comments to this question. The idea is to push your current build nuget package to the Octopus nuget server (and deploy based on it instead of TeamCity nuget feed).
So I've created a NuGet Publish build step, specified Api Key and Package Source but I have no idea what to specify in Packages field. In other words, what is the path to a freshly created nuget package for my build?
OctoPack creates the .nupkg file in a subdirectory \obj\octopacked\ of the project that contains the .nuspec file
It's described here. Specify a newline-separated list of NuGet package files (.nupkg) to publish to the NuGet feed. List packages individually or use wildcards.
The path to the newly created package file will depend on how your build is setup. But you can try a wildcard like **/*.nupkg and it will find all nupkg files in your build folder structure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With