Chicken and Eggs: Team City, Octopus, Integration Tests

I have a deployment pipeline I have built using a single Team City project which builds, deploys (to a test server) and runs my tests using Team City and Octopus (and NUnit if you want to be picky). The tests run a mixture of unit tests and integration tests against a test server. There is one problem, however. The Team City project uses Octopus to package (using Octopak) a nuget and the deploy the current code base to the test server but the Octopus server will always grab a nuget from Team City repository using the last known good build. The current build is not a candidate for the last know good build. This leaves me with a chicken and egg problem: how to get Octopus to deploy a nuget for a build in flight (and only to the test server) to produce a good build and nuget which can be deployed to my environments.

Is this even possible? Or am I being thick?

More info required?


Not thick at all :slight_smile: … this is a bit of a “gotcha” with TC/Octopus.

There are instructions on this page that should get you going:

(See the “Tip: delayed package publishing” section).


Worked great. Thanks.

For anyone interested, and while the video link doesn’t go stale, the part of the video most relevant is at ~00:35:00