user2113657
user2113657

Reputation: 191

Team City build with 2 web projects

Apologies if this is basic, but I seem to just be missing something.

I have a single solution with multiple class libraries and 2 MVC 4 web applications.

I've had one of those web projects for ages, and a Team City CI build that generates an artifact that I then deploy via Octopus Deploy. This works great.

I can't figure out the simplest way to either generate a 2nd artifact for the 2nd web project (same tc build, or a different one, I don't care).

End result: I want both web projects to be deployed to the same environments (IIS 7), with the 2nd site simply on a different port. I don't need TC to do anything special, just nuget restore, build, then generate the artifact.

Upvotes: 0

Views: 334

Answers (1)

DevOpsGuys
DevOpsGuys

Reputation: 59

If you always want to deploy both web applications at the same time. E.g they have some shared code libraries, then it's best to setup the deployments as multiple build configurations in a single project.

E.g

  1. Build project A
  2. Build project B
  3. Deploy project A
  4. Deploy project B

If you want to build and deploy the applications separately, then setup the two separate projects. This will allow you to have different build triggers, deploy schedules for both applications.

E.g.

Project A

  1. Build
  2. Deploy

Project B

  1. Build
  2. Deploy

In addition to this, you will need to have a nuget package for each web application. That means you need to run Octopack for each web app and have a nuspec file. Each project will need to generate its own nuget package artifact. In Octopus deploy, you need to either setup a single project with 2 steps or have 2 projects.

Upvotes: 0

Related Questions