How to use the push package build step

I have a build that is building an octopack package successfully.

I am now trying to push this package to my Octopus Deploy Built In Package Server by using the “Octopus Deploy: Push Package build” step. This build step requires a folder path and doesn’t appear to be able to have an artifact passed through.

The artifact is being created in my TeamCityData/system/artifacts folder which doesn’t appear to be accessible from the build step settings.

What is the correct way to push my octopack build using the Octopus Deploy: Push Package build step?

Hi James,

Thanks for reaching out! There’s a couple of things you can do here:

A) [Recomended] Use the MSBUild parameter /p:OctoPackPublishPackageToFileShare=C:\MyPackages to tell Octopack to copy the nuget package to a directory that your “Push Package” step has access to.

B) Use the below MSBuild parameters to tell Octopack to push the package to your feed right after it gets created. This way you won’t need the extra “Push” step.


Why don’t I recommend [B] over [A] if it involves less steps? Because [B] can be trickier to troubleshoot as the failure will come from the “MSBuild step”, but its not until you dig into the log that you’ll figure out if the problem came from the compilation, the packaging or the pushing. I personally rather have separate steps for every action. Totally your choice :slight_smile:

Hope that helps!