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 

    Add DB project and edit properties

    Edit DB properties

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

    Edit deploy tab

    Edit deploy tab

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

    Check-out process

    Check-out process

  4. Copy the file an rename it to the name you want
  5. Add the file to the source control and check-in it after rename it 

    Add the process to the source control

    Add the process to the source control

  6. open the new file
  7. delete all steps, arguments and variables 

    Delete any items

    Delete any items

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

    Add Sequence and MS build tasks

    Add Sequence and MS build tasks

  9. start adding the following argument as the following image 
    Arguments

    Arguments

     

     

    Arguments 2

    Arguments 2

     

     

    Set Configuration

    Set Configuration

  10. Save the file
  11. Check-in the file
  12. to keep my article simple I will do this step manually, copy your DB project folder to the Team Build machine folder
  13. 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

    New build definition

     

     

    Build use the create process

    Build use the create process

     

     

    Put the build parameters

    Put the build parameters

  14. Queue and build using the created build definition
  15. check your DB.
  16. Done.

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

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s