Deploy Published Zip File

Perhpas this post is incorrectly titled. Here’s my situation:
I have a .NET Core 2.0 web site which is built in TeamCity. I’m using the “command line” runner type with a script of “dotnet publish…”. It works beautifully. It then runs a Powershell script to zip up the output and mark it as an artifact.

The question is, how can I now access that artifact as a package so that it can be deployed using Octopus? I have other projects (using .NET Framework) that send it as a NuGet package to TeamCity’s internal feed using OctoPack which Octopus can then see. How can I do something similar either with OctoPack, or with the zip file for this project?

Thanks,

Hi,

Thanks for getting in touch! Zip files are supported only from within the Octopus built-in repository. You can check out supported package types in our documentation.

At the moment, OctoPack only supports nupkg packages. Instead of using OctoPack for packaging and pushing, you could instead use Octo.exe from a step in your build process to allow you to package into a zip file. We have great documentation on using Octo.exe here:

And to push packages to Octopus via Octo.exe:

I hope this helps! Don’t hesitate to reach out if you have any further questions going forward. :slight_smile:

Best regards,

Kenny

I only did a zip because I didn’t know how to create a NuGet package by
hand, so-to-say. And I couldn’t figure out how to do it using OctoPack for
.NET core. If that’s an easier route, please let me know how it can be
done that way.

Thanks,

Avraham Y. Seff

Hi Avraham,

Thanks for following up. Unfortunately OctoPack won’t work for .NET core projects. The project structure itself is different, as in it doesn’t have .csproj files which is what OctoPack depends on.

With our TeamCity plugin (which can be downloaded on our site), we have a step that allows you to create and push packages for any project. It points to a folder and packs whatever is there.

Let me know how you go and if you have any further questions. :slight_smile:

Best regards,

Kenny