Prezi

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in the manual

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

SQL Server Continuous Integration using Jenkins and Red Gate - Ernest Hwang of Practice Fusion

This is a presentation for a talk by Ernest Hwang in Mountain View on May 21, 2013.
by Ernest Hwang on 22 May 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of SQL Server Continuous Integration using Jenkins and Red Gate - Ernest Hwang of Practice Fusion

Ernest Hwang, Principal Software Engineer, Practice Fusion
ehwang@practicefusion.com
@ernestedcode Introduction Overview Red Gate SQL Source Control Continuous Integration SQL Compare and SQL Data Compare are used to deploy builds to target environments / databases (Integration / QA / Staging / Production)
"Deploying" to Production / Staging can be configured to just generate the upgrade scripts instead Plug In for SSMS
Creates a "snapshot" of the db schema
Snapshot is consumable by SQL Compare and can be compared against an actual db CI Server polls for changes
Build job kicks off
Verifies that database can be built
Runs Unit Tests
Archives the artifacts
Emails engineers when there are problems Deploying Builds SQL Server Continuous Integration
using Jenkins and Red Gate http://practicefusion.com/careers/ Ernest Hwang, Principal Software Engineer at Practice Fusion in San Francisco (we're hiring!)
C#, .NET, SQL Server Developer
Working with SQL Server since 1999
Using Red Gate for Continuous Integration since June 2011
Someone who got tired of maintaining dozens of database scripts for every release Why am I Here? To demonstrate how easy it is to apply CI principals to Database Development Version control your database
Use Continuous Integration to validate "builds"
Automate your database deployments
Run unit tests Prerequisites Experience with source control management systems (Subversion, Git, TFS, Hg)
Familiarity with Continuous Integration products (Jenkins, Team City, Cruise Control Bamboo)
Awareness of build scripting languages (ant, Nant, MSBuild, PowerShell) Software SQL Server 2008 / 2012
Red Gate SQL Source Control
Red Gate SQL Compare
Red Gate SQL Data Compare
Jenkins Continuous Integration Server
MSBuild SAT Analogy SQL Source Control is to SSMS
as
TortoiseSVN is to Windows Explorer Demo Environment GitHub Repository Developer Workstation Local copy of RGDemo database Build and Database Server
(Windows Azure VM) Dev, QA, & Prod
Databases Demo: Committing Changes to Source Control Local Database Changes Commit Changes via SQL Source Control Changes committed to SCM repository Demo: Breaking the Build Commit changes via SQL Source Control CI Server detects changes and kicks off build process Build can pass or fail validation Demo: Deploying to Dev / QA SQL Source Control Repository SQL Compare Target Database Creating a Database "Version" Jenkins Versioning plug in and MSBuild Community Tasks
Create a User Defined Function called dbo.DATABASE_VERSION()
Create build step to overwrite this UDF with every build
Updated UDF is archived (not checked into source control) Demo: Versioning Your Database Commit changes Kick off build Update dbo.DATABASE_VERSION() Archived Updated UDF Unit Testing tSQLt is an open source testing framework
SQL Test (by Red Gate) wraps this framework in SSMS
The CI server can validate the tests with every build Demo: Unit Testing with tSQLt Commit changes Kick off build Run Unit Tests Build can pass or fail Springer's Final Thought Save developers' time
Identify holes in deployment process
Provides a build artifact that can be easily deployed to various environments and rolled back Links ehwang@practicefusion.com
@ernestedcode
https://github.com/CF9/Databases.RGDemo

http://practicefusion.com/careers
facebook.com/practicefusion
@practicefusion Appendix 1: CI Servers Jenkins (open source)
Team City (JetBrains)
Bamboo (Atlassian)
CruiseControl / CruiseControl.NET
See the full transcript