Octopus Deploy - Part II - Team Foundation Server setup

In our second post about Octopus Deploy, we'll go over the Team Foundation Server build setup.

1. Visual Studio setup
2. Team Foundation Server setup
3. Octopus Dashboard setup
4. Project Features
5. Extras


Team Foundation Server Setup

We're assuming you already have an existing TFS Build setup for your solution, if not create one so that you can then apply the changes listed below.



Step 1 - Open an existing TFS Build

In Visual Studio, open Team Explorer then click on Builds. Right-click the desired build and click on Edit Build Definition.


Step 2 - Modify the Build path

Click on the Process tab in the left menu then expand Items to Build:
  1. Set Configuration to Build to Any CPU/Release
  2. Set Projects to Build to the build.proj file instead of your typical solution file (.sln)
$/TFSFolder/SolutionFolder/WebProjectFolder/build.proj


Step 3 - Get an Octopus API Key

Typically your system administrator will provide the API Key, but you can create/get a new key via the Octopus Dashboard web interface. You'll need an account setup so you can access the Octopus Dashboard.

If you have access then on the Octopus Dashboard, click on your username in the top menu on the right then select Profile. Under the Profile view, select the API Keys tab where you can generate a key which is needed in the next step.

Step 4 - Edit the MSBuild arguments

Back to Visual Studio, in your TFS Build Process tab, expand the Advanced option and add the following arguments which includes both your API Key and Octopus deployment server which needs to be provided by your system administrator.

/t:Build /p:RunOctoPack=true /p:OctoPackPublishApiKey=[API Key] /p:OctoPackPublishPackageToHttp=[OctopusDeploymentServerUrl]

That's it! In the next article, we'll discuss the Octopus Dashboard setup.

[original publish date: 11/30/15]

Comments

Popular posts from this blog

ASP.NET Identity Remember Me

IIS Express Client Certificates

ASP.NET MVC - How to enable/disable CaC/Client Certificate authentication per area or route.