0

I am trying to set up one of my ASP.net projects for continuous integration with TFS. Amongst my requirements, I need to set up TFS so that each time there is a successful build with passing tests, the ASP.net code should be deployed to my development web server.

What I have done so far is I have set up a private agent behind my firewall (so that the agent has a "line of sight" to the development web server. I've set up a build that runs all unit tests, and I have the gated check-in setup up so that the build is rejected if the tests don't pass.

I can see that the build artifact is created by the agent, but I am stuck with trying to figure out how to actually deploy the artifact to the development web server.

I have my publish profiles in Visual Studio, but I'm guessing that those are useless in TFS.

Vivian River
  • 31,198
  • 62
  • 198
  • 313
  • Have you looked at the documentation? https://learn.microsoft.com/en-us/vsts/build-release/actions/create-deploy-releases – Daniel Mann Nov 13 '17 at 21:20
  • Yes, I read that document you linked. It doesn't so much as tell me how to specify what server I want to deploy to! – Vivian River Nov 13 '17 at 22:05
  • It's just like creating a build: Compose a deployment out of the available tasks. If a task doesn't exist to do what you want, write your own or find something on the marketplace that does it. This question is too broad as-is. – Daniel Mann Nov 13 '17 at 22:40

1 Answers1

2

You can refer to below link and follow the steps mentioned in the article to deploy the artifact to the web server:


For the publish profiles, you can pass parameters into MSBuild during the building in TFS, eg : /p:DeployOnBuild=true;PublishProfile=MyProfile

Reference below threads to use the Publish Profiles:

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55