Team Foundation Server 2017 Build and Release

2k Views Asked by At

I'm trying to setup TFS 2017 in my company. Everything is fine until I came to release tab. I'm little bit confused.

How on earth I need to deploy everything to my local server. I read a lot of articles regarding this but still confused how to use artifacts. Right now I have setted up source control and created build definition and stuck on release.

Anybody manage to setup release in TFS 2015 or 2017? Any help would be great!

2

There are 2 best solutions below

0
On BEST ANSWER

I found this article that explains how to build and deploy web project on premise. Hope this will help somebody.

Need to use this arguments in Visual Studio Build task

/p:DeployOnBuild=True /p:DeployDefaultTarget=WebPublish 
/p:WebPublishMethod=FileSystem /p:DeleteExistingFiles=True 
/p:publishUrl=$(build.artifactstagingdirectory)\for-deploy\website

It will create in Artifacts folder with website that can be simply copied to remote machine in Release definition.

2
On

You should view artifacts as single deploy able packages, so if your application has a front end website and a database you can package them up the website as one artifact and the database as another during the build. When it comes to a release, your release could deploy the website to one server and the database to another or even the same server, the choice is yours. I tend to have development environments hosted on a single server but pre-production and production are load balanced, the only change from development to production is the name of the server to deploy the change to.