1

Remote customer's policies don't allow for me to publish from my dev environment directly to their server. I remote into environment and copy the published artifacts (Asp.Net-MVC) to the test environment. Deployment process between the different environments (Build/Test/Staging/Production) is currently done manually, which is time consuming and prone to mistakes.

I know there are tools that already exist and looked at a few CI & CD solutions, but a lot look like overkill for what I want at the moment. Looked into Jenkins, Octopus, MSDeply, PSDeploy, Robocopy and others to name a few, but now I'm not sure which path to take. Read up on the continuous deployment approach which is where I eventually want to reach as I am really trying to avoid reinventing the wheel and write my own custom deployment tool which is a nasty habit I'm trying to break given the many hats I have to wear.

Any advice on how to automate this process on a standalone server? At this stage the focus is on the movement of files and not the migration of databases.

Thanks

Nkosi
  • 235,767
  • 35
  • 427
  • 472

2 Answers2

2

A CI server is, at it's core, just a task runner. Jenkins is a great open source CI server with many plugins.

For simple web deployments, you just need to pull down the source, execute a build using MSBuild, and then perform a deployment using a publish profile.

MSDeploy will get used under the hood, but you can have it just copy files. The build and deployment can actually be accomplished in a single step by passing in the appropriate build parameters.

msbuild someproject.sln /p:DeployOnBuild=true /p:PublishProfile=Prod

Jenkins can be set up to perform this build on demand, or whenever something is checked in.

Even for someone with no experience, you should be able to get this up and running in a day.

Josh
  • 44,706
  • 7
  • 102
  • 124
  • In my case I do the build in my environment and then copy it over to their environment. Would i then just be able to do the deploy aspect using the publish profile for test,staging and prod when needed? – Nkosi Jan 14 '16 at 19:40
  • 1
    @Nkosi - In that case I would look at creating a publish package. You will have to learn some about MSDeploy, but it will allow you to create a single package and deploy it to multiple environments. You can even override settings as necessary. – Josh Jan 14 '16 at 19:57
  • I'll put it on the list then. Thanks. – Nkosi Jan 14 '16 at 20:07
  • @Nkosi - It's worth noting that pretty much all of this can be done using powershell as well. If you don't need sophisticated, a simple powershell script is easy and straightforward. – Josh Jan 14 '16 at 20:09
  • And I suppose I should clarify that creating the package and then calling MSDeploy can all be done via powershell :) – Josh Jan 14 '16 at 20:14
  • Yeah I get that. As I said before I create the package in my env and then copy it over to server. I'll use ps to then call MSDeploy. Thanks again for your help. – Nkosi Jan 14 '16 at 20:20
0

Why not use Release management ? Its a microsoft tool that connects to tfs great through its template . You need to create a build definition using a build server which is set to CI meaning each check in would upload code to the needed environments in release management you can create an approval step , where only approved builds will be uploaded . To enable dev work and check ins without the item being uploaded just create 2 branches HEAD and DEV and put your ci listener (source folder) only on HEAD . When the developer will merge from DEV to HEAD and checkin the files will be uploaded .