Running the Octopus Release task in the same build configuration as the build task

I’d like to have one build configuration that has two steps - build, and then run Octopus Release. When I do this, I noticed Octopus was picking up the wrong package. So I put the --packageversion parameter in, and I was getting errors that the package wasn’t found; however, when I went in the UI for Octopus, I could find it.

So I put a step in the build script that called a command line script that waited for 60 seconds, but still, it didn’t work. So I’m assuming that TeamCity doesn’t upload the package until AFTER the build configuration is done running.

This means I have to create a separate build configuration for deployment with a dependency on the first.

I’d rather not do this - as I have a lot of projects. So my question is, is there any way to have a single build configuration with two build steps, and get Octopus to pick up the NuGet file from the first step for its use?

Hi Andrew

Unfortunately this is a TeamCity limitation, there’s nothing we can do about it.

The only workaround would be to use a separate NuGet server, and to perform a NuGet “push” to that server, before your Octopus deploy step.