mohamedradwan.com - Nothing can beat experience
Post
Cancel

Creating and Deploying Web Package during TFS Build 2013

I have an old post that perform++the same idea++with TFS 2010 but as usual there are some differences with TFS 2013:-) How to run remote deploy with MS Deploy

I tried many ways with++many blog posts, they are almost the same but none of them worked for me, so I decide to create my own solution and share that include++the Build Process Template, Of course I needed to install++MSDeploy (Web Deploy 3.5) on the Build machine, remember how to install++Web Deployment Agent Service if it's not available

Customize the process template as the following:

I didn't include error handling during++the customization, you may need to do that :-)

  • Adding ConverWorkspaceItem and If activities, we could add++ConverWorkspaceItem part of the If++sequence, this even could be better, you can do that too :-)

    ConvertWorkspaceItem and Create packge with Deploy

  • The ConverWorkspaceItem will transform the web application selected in the build definition to a local path

    ConverWorkspaceItem

  • In the If activity the main 2 activities are, Create Package (MSBuild activity) and Deploy Package (InvokeProcess activity)

    Create and Deploy package workflow

  • The Create Package activity will be as the following:
    • Configuration ---> the configuration that entered in the build definition
    • CommandLineArgument ---->/t:build;publish
    • Project ----> the project that transformed from ConverWorkspaceItem activity

    Create Package - MSBuild

  • The Deploy Web Package (InvokeProcess)++activity will be as the following image:

    Deploy Web Package InvokeProcess

  • The created package on the working directory on the build agent will be as the following:

    Web Package

  • The Deployment section on the build definition will be as the following:

    Dev_Build_Deploy

  • How to test the create deployment file on the build agent Run file.Deploy.cmd

  • How to publish without a package using a publish profile

    Run MSBuild with publish profile

  • How to add a parameters value inside the parameter file.xml that created with the package

    Create Web package and add one paramter in the file

Download the process Template

Trending Tags