Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build once feasible with build server?

I have been reading about building once and then configuring for each environment. For example, here are some ideas how to do this: Build once and deploy to multiple environments with msdeploy & Visual Studio 2012

My question is, how does this work together with your build server? Does anyone ever kick off one build that deploys to multiple environments? I would expect each environment would have its own build definition with its own rules/schedule. In that case, how feasible is it really to build once? I feel like I'm missing something...

like image 475
Nelson Rothermel Avatar asked Nov 20 '25 12:11

Nelson Rothermel


1 Answers

I work with a build pipeline based on MSDeploy and the Web Publishing Pipeline, but it's not a scenario directly supported by the MSBuild scripts.

The basic premise I use is that a package is built during the first "stage" of the build and then deployed to various environments until it's in production. How your build server handles cross-build "artifacts" is something you'll need to look into.

The other problem is that deploying a package to a publish profile is not something that's currently supported. However, you always have the alternative of deploying the package from the command line (or even uploading it to an administrator who can import it via IIS).

These resources (which, disclaimer, include links to my own blog and code) should help:

  • msdeploy-package-publish on GitHub
  • My "Building a Deployment Pipeline with MSDeploy" blog series
like image 140
Richard Szalay Avatar answered Nov 23 '25 02:11

Richard Szalay