TFS Octopack and octopus deploy

Recently started using octopus deploy as part of our ALM process. It really make the whole deployment process a lot easier, and I may write later on this blog about it. I wanted to have our build process and versioning done in TFS, and have the build publish packages to octopus.

There are many way to accomplish the task. Here is what we have ended up with.

  1. First, make sure that every project you want to publish have a nuget reference to Octopack.
  2. Now create a new empty build process
  3. Go to the vs marketplace and install Octopus plugin for tfs.
  4. Add the following tasks to your build (you can ignore the tsbuild task, it is part of a custom build we do with our ts files)

  1. Select Get sources, and make sure you have clean output directory selected in clean options. If you do not, your bin folders will contain multiple package versions, this will increase publish time to octopus.
  2. Now select the run Build solution task
  3. Set msbuild arguments to the following

/p:RunOctoPack=true /p:OctoPackEnforceAddingFiles=true /p:OctoPackPackageVersion=$(Build.BuildNumber)

  1. Select push packages to octopus task and configure it like this

  1. Now select the create octopus release task and add configure it..

  1. Now under options -> build number format, make your build number format semver compatible

There you go, you now have your versioned packages published from tfs to octopus, ready to deploy!

Submit a Comment

Your email address will not be published. Required fields are marked *

Share This