Deployments are always 1 package behind

Using a stack of Subversion, Team City, and Octopus Deploy, I have to deploy my application twice to see the changes I commited in Subversion.

When I commit changes to Subversion I have continuous deployment using Team City. It creates the nuget package, deploys to server, but it does not contain my updated code.

I have to manually click Run in team city to deploy again, to then see my updated code. If I check in more code to Subversion it will show the changes from my previous check in.

Anyone know what’s going on and why?

Artifacts in Teamcity get available after the build finished. So if you build en publish to Octopus deploy in the same buildconfiguration where you build your code, the old artifacts (previous build) are used. Split the build step and publish step in different build configurations and create a snapshot dependency.

Perfect. This solved my problem. Thank you.