Azure Cloud Service Deployment - Octopus Deploy gets artifacts from previous build

Hello,

From reading the Octopus Deploy documentation it seems OctoPack doesn’t support Azure Cloud Service Projects. So I am performing all the steps needed as targets in msbuild:

  • Nuget Restore on Solution
  • Build Solution
  • Publish Web project to disk
  • Create CSPkg using cspack.exe based off the files that were published
  • Create nuget package (contains cscfg and cspkg)

This is one step in team city (kicked off via Powershell runner)

My problem is, right after the powershell script kicks off I am using the Octopus Deploy (Deploy Step), but the artifact (nuget package) is not published to the internal team city feed yet, so when Octopus Deploy tries to grab the nuget package, it’s taking the package from the last build. I compared my other projects in team city (which uses OctoPack) and it seems to work fine.

Any ideas on what I am doing wrong?

Another interesting point, in the projects that work, I didn’t even setup an artifacts path in team city to expose the nuget package. It just somehow knows to look in src/_build/Artifacts. My hunch is OctoPack is somehow taking care of this, but I can’t seem to find where it’s doing this additional work.

I should also mention everytime a build is kicked off, the nuget package version is the same so I am forcing a download each time, the version bump happens in a custom file I created, so as of now everything is 1.0.0

My other solution: Use another nuget server, and add a nuget publish step between my build and OD Deploy step and reconfigure my Octopus Deploy project to pull from this new nuget server. But I rather not do that just yet.

Any help is greatly appreciated.

I was able to resolve the issue, I needed a way to expose and publish my artifacts during the project build (not after). Please see my blog post