New release is created in Octopus via TeamCity with some old nuget package version reference

Hi All,

We have faced with issue during creation of releases in Octopus via TeamCity plugin: the release created in Octopus has references to some old nuget packages from previous version.
In TeamCity configuration we have 2 steps: one that runs OctoPack and generates nuget packages and publishes them to TeamCity NuGet feed and another that will create new Release in Octopus using Octopus Teamcity plugin. It seems like one of the packages is taking long time to build and to publish and the ‘create new Release in Octopus’ step in TeamCity configuration is started when one of our packages is not fully published and it is references the one from previous version. We have added 2 min wait between the 2 TeamCity configuration steps, and now it is working as expected, but this is not the best solution for us. Since we need to decrease the build time as much as possible

Hi,

Thanks for reaching out. This is a very common issue in TeamCity that we cover on the “delayed package publishing” tip on the link below. (almost at the bottom of it)

You’ll basically need to separate the build config that builds your app/packages from the one that triggers the release.

Let me know if that helps,
Dalmiro

Thanks, but we want to avoid creating new configs in TeamCity. Are there any ways to do this inside 1 TeamCity configuration

The problem is that TeamCity only makes the packages available from his feed after the build that created the package has ended. This is a limitation of the TeamCity nuget feed.

You could avoid this by pushing the Package to the Octopus Server built-in feed instead of the one provided by TeamCity. This way the pacagae will be pushed in 1 step of a build, and then It’ll be available on the Octopus server to be used by the next step of the same build.

Thanks,
Dalmiro