Octopack

hi

what does Octopack provide that I couldn’t do by using Nuget commands directly from within my CI server build steps?
Btw I’m using CruiseControl.net

thanks

Hi,

Nothing - in fact, all OctoPack does is create a .nuspec file based on the files in your project (e.g., your .js, .css, .png, .cshtml, .config, .dll and .exe files etc) and then invokes NuGet.exe pack.

You can certainly go down the nuget.exe route. This page gives some info about what Octopus expects to be in your package:

Paul

hi Paul - thanks for the info. I’m now considering TeamCity over CruiseControl.

on the surface it seems preferable to use the nuget pack command directly against my C# proj file (nuspec) rather than have Octopack installed against every project that we have?

I initially thought Octopack might be to automatically include all of the runtime files that a project has rather than just the assembly/dll, but it’s the file properties/metadata that dictate that.

I also had a quick look at the Octopack source, there looks like more logic in there than just a wrapper around calling .nuspec?

actually, I just re-read the help, and it says this: “OctoPack will include any files marked with the Build Action set to Content in the Solution Explorer properties window”.

So that’s really the reason you’d need to use Octopack as the nuget command can’t automatically do that can it? (you’d have to individually include all runtime files)

I just installed OctoPack and find the implementation brilliantly straightforward. I was up and running with the tool in 5 minutes (Visual Studio 2013) and it only made a very few intelligent changes to config files upon install.

OctoPack has saved me many tedious and error prone steps between build and deployment. Now I can go from running a simple command line straight to deploying via Octopus. Very nice!

I know I can do all this myself with nuget.exe, etc.
However, have you given any thought into conforming to the WebDeploy publish stuff.
I use http://sedodream.com/2010/05/01/WebDeploymentToolMSDeployBuildPackageIncludingExtraFilesOrExcludingSpecificFiles.aspx
To make sure the extra files I need get pushed to deploypackage zip file. Furthermore, it might be quicker just to have a octopus tool that would simply take my deploypackage zip file and nuget it. I was going to write that tool if you hadn’t done it yet, not that I am offering or anything.

Well that was easy enough. Here is how I make a nuget that is based upon the Publish Webdeploy package stuff for an ASP.NET MVC App.

  1. I use TextTransform (.tt) to generate a nuspec that always has the right version number.

TheApp.tt begets TheApp.nuspec which is shown below;

<?xml version="1.0"?> TheApp 1.0.6 TheApp Pingo LLC Pingo LLC https://localhost/License.txt https://localhost/TheApp false Pingo Helpers for MVC Pingo Helpers for MVC. Copyright © Pingo LLC 2015 Pingo PingoFeature
  1. The important entry is the stuff, version number, etc. TT is great.

  2. I have a publish profile called WebDeployPackage. My MSBUILD command is as follows.
    /t:rebuild /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=WebDeployPackage
    That puts the website in the following folder;
    obj\Release\Package\PackageTmp

  3. From the project folder I call the following CMD
    …nuget\NuGet.exe pack TheApp.nuspec

  4. Done.

Now to automate this in Jenkins where my nugets are created and auto published to Artifactory.