mohamedradwan.com - Nothing can beat experience
Post
Cancel

Deploy DB project with Team Build 2010

I work in a project and I try to automate everything so I just need to automate the deployment of the project including the DB with the CI (continuous integration) to QA machine or Testing environment so the scenario start with the developer try to check-in his code so the team build start build the project and when he succeeded it will deploy the website to the Testing web server and deploy the DB to the Testing DB server, to keep my article simple I will just describe the part of the DB only so I will separate it from the rest of the project

  1. Create DB project

    Edit DB properties

  1. Edit the properties of the DB project in the deployment tab so it will deploy script and create the DB

    Edit deploy tab

  2. Check-out any process template from the process template folder

    Check-out process

  3. Copy the file an rename it to the name you want

  4. Add the file to the source control and check-in it after rename it

    Add the process to the source control

  5. open the new file

  6. Delete all steps, arguments and variables

Delete any items

  1. Add sequence task and a MS Build task inside the sequence from the tool box

    Add Sequence and MS build tasks

  2. Start adding the following argument as the following image

    Arguments

    Arguments 2

    Set Configuration

  3. Save the file

  4. Check-in the file

  5. To keep my article simple I will do this step manually, copy your DB project folder to the Team Build machine folder

  6. Start create new build definition from the new process file and give this build definition the need parameter and one of them is the path of the DB project on the Team build server

    New build definition

    Build use the create process

    Put the build parameters

  7. Queue and build using the created build definition

  8. check your DB.

  9. Done.

You can download the process template files and the parameters value by clicking here

Trending Tags