SlideShare a Scribd company logo
#sqlinthecity

Automated Build and Test
(or continuous integration)
(for your database)

David Atkinson
Product Manager, Red Gate
David.Atkinson@red-gate.com
#sqlinthecity

What will we cover today?

Database build automation:
What, Why, How
Practical Demo
Questions encouraged!
#sqlinthecity

Show of hands:
How agile is your database development?
1. Database objects/scripts aren’t in version control
2. Database objects/scripts are in version control
3. An automated build system exists to build and test
the database
4. An automated release system is used to promote
your database to your environments
#sqlinthecity

How agile is your database development?
1. Database objects/scripts aren’t in version control
2. Database objects/scripts are in version control
3. An automated build system exists to build and test
the database
4. An automated release system is used to promote
your database to your environments
#sqlinthecity

What is continuous integration?
“Continuous Integration is a practice
designed to ensure that your software is always
working, and that you get comprehensive
feedback in a few minutes as to whether any
given change to your system has broken it.”
Jez Humble, ThoughtWorks, author of
“Continuous Delivery”
database

#sqlinthecity

What is continuous integration?
^

“Database Continuous Integration is a
practice designed to ensure that your database
software is always working, and that you get
comprehensive feedback in a few minutes as to
whether any given change to your system has
broken it.”
#sqlinthecity

Database Build Automation
#sqlinthecity

What is build?
• For application code = compile
• For database code = database creation script
– But only for a new installation!
• Upgrade scripts required for existing
installations
– Need to preserve the state of the data
#sqlinthecity

What is test?
• For .NET code, NUnit.
– Runs on a developer’s machine and build
server
• What about the database?
– tSQLt is an open source framework for testing
SQL Server databases
– SQL Test provides SSMS integration
#sqlinthecity

Demo background
Two fictional developers, David and Grant,
are working on the website, www.simpletalk.com, a community website for .NET
and SQL Server developers
The application comprises
• An ASP.Net web application
• A SQL Server database
#sqlinthecity

Demo background
Continuous integration has been configured
to:
1. Keep a test database up to date with the
latest changes
2. Run automated tSQLt tests
(on realistic amounts of data)

3. Generate up-to-date documentation
4. Generate deployment scripts
#sqlinthecity

Demo background
A few improvements are being made to
Simple Talk.
These changes will be deployed to
production.
But… only when the dev team has
demonstrated that the changes work!
#sqlinthecity

Tools used
• TeamCity (CI tool from JetBrains)
• SQL Automation Pack (includes TeamCity plugin)
• Glimpse (open source)

From the SQL Developer Bundle:
•
•
•
•

SQL Source Control
SQL Test (tSQLt unit testing framework)
SQL Data Generator
SQL Doc
#sqlinthecity

Demo
Custom Migration Scripts
An introduction

#sqlinthecity
#sqlinthecity

Generating a deployment script
1

12
#sqlinthecity

How changes are made
create
table

modify
procedure

1

2

3

delete
column

create
trigger

drop
view

4

5

6
#sqlinthecity

How changes are made
create
table

modify
procedure

1

2

modify
trigger

create
function

7

3

drop
procedure

8

4

10

6

5

create
view

modify
function

9

delete
column

create
trigger

drop
view

create
procedure

11

12
#sqlinthecity

How SQL Compare sees the world
1

12
#sqlinthecity

But not all changes can be inferred
1

2

3

5

column
rename

merge table

8

merge column
split column

9

6

add NOT NULL
column without
DEFAULT

table
rename

split table

7

4

10

11

data transformation
data motion

12
#sqlinthecity

SQL Compare and SQL Source Control
support custom migration scripts
1

2

3

4

5

6

11

12

Custom migration script

7

8

9

10
#sqlinthecity

Deployment script with migration
scripts
1

12
#sqlinthecity

1
1’
12
#sqlinthecity

Demo
#sqlinthecity

Recap: database CI
1. Incrementally keeps a test database up to date
2. Runs tSQLt tests on a database with realistic
amounts of data
3. Generates always-up-to-date documentation
4. Generates and validates deployment scripts
5. Publishes a Deployment Manager database
package
#sqlinthecity

Recap of demo: writing a test
1.
2.
3.
4.
5.

A new test is added
Continuous Integration identifies a failure
We reproduce the bug locally
We fix the bug and test it
We commit the fix to source control
#sqlinthecity

Recap: migration scripts
1. The fix sets the [PublishDate] column from NULL to
NOT NULL
2. Grant’s “get latest” fails because existing data that
has NULL values
3. The continuous integration build alerts us of the
same issue
4. A migration script is added to UPDATE existing
data prior to changing the column to NOT NULL
5. Get Latest becomes possible and the continuous
integration build once again indicates working
software
#sqlinthecity

Latest version at :

www.red-gate.com/CI
David.Atkinson@red-gate.com

Questions?

More Related Content

What's hot (20)

PPTX
In (database) automation we trust
DBmaestro - Database DevOps
 
PPT
Database continuous integration, unit test and functional test
Harry Zheng
 
PPTX
Automate Database Deployment - SQL In The City Workshop
Red Gate Software
 
PPTX
Why retail companies can't afford database downtime
DBmaestro - Database DevOps
 
PPTX
Database Deployment Pipeline - SQL In The City Workshop 2014
Red Gate Software
 
PPTX
Successfully migrating existing databases to Azure
Red Gate Software
 
PPTX
Delphix and DBmaestro
Kyle Hailey
 
PPTX
Best Practices for Database Deployments
Red Gate Software
 
PPTX
Continuous Delivery & the Database - the Final Frontier
XebiaLabs
 
PPTX
Continuous Delivery & the Database- The Final Frontier
DBmaestro - Database DevOps
 
PPTX
Challenges and Best Practices of Database Continuous Delivery
DBmaestro - Database DevOps
 
PPT
Chef Delivery
Chef
 
PPTX
Continuous integration sql in the city
Ike Ellis
 
PDF
Continuous integration
hugo lu
 
PDF
Why source control your Oracle Database?
Red Gate Software
 
PDF
Dynamic bpm design by doing lightning talk
ITD Systems
 
PDF
Scaling Jenkins
Udaypal Aarkoti
 
PDF
JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...
CloudBees
 
PPTX
The Future of Change Management and DevOps for Dummies
DBmaestro - Database DevOps
 
PPTX
The Key Components of Adopting CI The OpenStack Way
iWeb (group INAP)
 
In (database) automation we trust
DBmaestro - Database DevOps
 
Database continuous integration, unit test and functional test
Harry Zheng
 
Automate Database Deployment - SQL In The City Workshop
Red Gate Software
 
Why retail companies can't afford database downtime
DBmaestro - Database DevOps
 
Database Deployment Pipeline - SQL In The City Workshop 2014
Red Gate Software
 
Successfully migrating existing databases to Azure
Red Gate Software
 
Delphix and DBmaestro
Kyle Hailey
 
Best Practices for Database Deployments
Red Gate Software
 
Continuous Delivery & the Database - the Final Frontier
XebiaLabs
 
Continuous Delivery & the Database- The Final Frontier
DBmaestro - Database DevOps
 
Challenges and Best Practices of Database Continuous Delivery
DBmaestro - Database DevOps
 
Chef Delivery
Chef
 
Continuous integration sql in the city
Ike Ellis
 
Continuous integration
hugo lu
 
Why source control your Oracle Database?
Red Gate Software
 
Dynamic bpm design by doing lightning talk
ITD Systems
 
Scaling Jenkins
Udaypal Aarkoti
 
JUC Europe 2015: How to Optimize Automated Testing with Everyone's Favorite B...
CloudBees
 
The Future of Change Management and DevOps for Dummies
DBmaestro - Database DevOps
 
The Key Components of Adopting CI The OpenStack Way
iWeb (group INAP)
 

Viewers also liked (20)

PPTX
Search Intelligence - Social Media e Search Marketing - Proxxima 2011
Leonardo Naressi
 
PPTX
Guía de análisis de fuentes
Sgarcia137
 
PPT
Cochrane+
librarianhelen
 
PDF
Curso: Redes y telecomunicaciones: 06 Protocolo IPv4
Jack Daniel Cáceres Meza
 
DOC
N tier architecture
Nidhi Saurav
 
PDF
6ª Manoca do Canto Gaúcho Fase Local
manocadocantogaucho
 
PPT
Meiosis
wendyhilburn
 
PDF
Future in focus brazil mar2012 final
Leonardo Naressi
 
PPT
Passeioda8seriefazzendaparkhotel
midiasvidal
 
DOCX
The Cover Letter 2015
Kundai Dennis Musuka
 
PPSX
Presentación de la Consultoría Industrial X efficiency
Consultoría Industrial X-efficiency
 
PDF
Modelagem e Análise de Dados em PPC - Search Masters Brasil 2013
Leonardo Naressi
 
PDF
Select brands
Bronwen Elizabeth Madden
 
PDF
Burlando win xp original
Emanuel Francisco
 
PPT
Brand story
Ali Hadi
 
PPTX
Investment Funds Regime in Guernsey 21 July 2016
Institute of Chartered Secretaries and Administrators
 
PDF
Veritas - resiliency platform
Fernando Alves
 
PPTX
Estudo 15 11 - aspectos importantes da oração bem sucedida
Jaed Gomes
 
PPTX
Marcas e patentes
bruno2m1
 
PDF
Maidan Summit 2011 - Mandira Srivastava, Isha Foundation
Maidan.in
 
Search Intelligence - Social Media e Search Marketing - Proxxima 2011
Leonardo Naressi
 
Guía de análisis de fuentes
Sgarcia137
 
Cochrane+
librarianhelen
 
Curso: Redes y telecomunicaciones: 06 Protocolo IPv4
Jack Daniel Cáceres Meza
 
N tier architecture
Nidhi Saurav
 
6ª Manoca do Canto Gaúcho Fase Local
manocadocantogaucho
 
Meiosis
wendyhilburn
 
Future in focus brazil mar2012 final
Leonardo Naressi
 
Passeioda8seriefazzendaparkhotel
midiasvidal
 
The Cover Letter 2015
Kundai Dennis Musuka
 
Presentación de la Consultoría Industrial X efficiency
Consultoría Industrial X-efficiency
 
Modelagem e Análise de Dados em PPC - Search Masters Brasil 2013
Leonardo Naressi
 
Burlando win xp original
Emanuel Francisco
 
Brand story
Ali Hadi
 
Investment Funds Regime in Guernsey 21 July 2016
Institute of Chartered Secretaries and Administrators
 
Veritas - resiliency platform
Fernando Alves
 
Estudo 15 11 - aspectos importantes da oração bem sucedida
Jaed Gomes
 
Marcas e patentes
bruno2m1
 
Maidan Summit 2011 - Mandira Srivastava, Isha Foundation
Maidan.in
 
Ad

Similar to Database automated build and test - SQL In The City Cambridge (20)

PPTX
11 Goals of High Functioning SQL Developers
Ike Ellis
 
PDF
Case study: 13 Common Mistakes Organizations Make With DLM and How to Solve Them
Red Gate Software
 
PDF
Database CI Demo Using Sql Server
Umesh Kumar
 
PDF
Relational Database CI/CD
Jasmin Fluri
 
PPTX
Grant Fritchey Justin Caldicott - Best practices for database deployments
Red Gate Software
 
PPTX
Get Testing with tSQLt - SQL In The City Workshop 2014
Red Gate Software
 
PPTX
Getting CI right for SQL Server
Alex Yates
 
PDF
Delivering changes for applications and databases
Eduardo Piairo
 
PPT
Database Change Management
headspringlabs
 
PDF
Continuous Integration for Oracle Database Development
Vladimir Bakhov
 
PPTX
Sql source control
AndyPickett
 
PDF
Using Redgate, AKS and Azure to bring DevOps to your database
Red Gate Software
 
PPTX
The Science of database CICD - UKOUG Breakthrough
Jasmin Fluri
 
PPTX
Building an automated database deployment pipeline
Red Gate Software
 
PDF
Resume July 2015
Scott Nichol
 
PDF
A data driven etl test framework sqlsat madison
Terry Bunio
 
PPTX
#DOAW16 - DevOps@work Roma 2016 - Databases under source control
Alessandro Alpi
 
PDF
Automated Build and Test (for Continuous Integration) - David Atkinson - SQL ...
Red Gate Software
 
PPTX
manage databases like codebases
DBmaestro - Database DevOps
 
PPTX
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Dr. John Tunnicliffe
 
11 Goals of High Functioning SQL Developers
Ike Ellis
 
Case study: 13 Common Mistakes Organizations Make With DLM and How to Solve Them
Red Gate Software
 
Database CI Demo Using Sql Server
Umesh Kumar
 
Relational Database CI/CD
Jasmin Fluri
 
Grant Fritchey Justin Caldicott - Best practices for database deployments
Red Gate Software
 
Get Testing with tSQLt - SQL In The City Workshop 2014
Red Gate Software
 
Getting CI right for SQL Server
Alex Yates
 
Delivering changes for applications and databases
Eduardo Piairo
 
Database Change Management
headspringlabs
 
Continuous Integration for Oracle Database Development
Vladimir Bakhov
 
Sql source control
AndyPickett
 
Using Redgate, AKS and Azure to bring DevOps to your database
Red Gate Software
 
The Science of database CICD - UKOUG Breakthrough
Jasmin Fluri
 
Building an automated database deployment pipeline
Red Gate Software
 
Resume July 2015
Scott Nichol
 
A data driven etl test framework sqlsat madison
Terry Bunio
 
#DOAW16 - DevOps@work Roma 2016 - Databases under source control
Alessandro Alpi
 
Automated Build and Test (for Continuous Integration) - David Atkinson - SQL ...
Red Gate Software
 
manage databases like codebases
DBmaestro - Database DevOps
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Dr. John Tunnicliffe
 
Ad

More from Red Gate Software (20)

PDF
Embracing DevOps through database migrations with Flyway
Red Gate Software
 
PPTX
Database DevOps for Managed Service Providers
Red Gate Software
 
PDF
Mizuho Financial: Launching our Database DevOps journey
Red Gate Software
 
PDF
7 steps to effective SQL Server monitoring
Red Gate Software
 
PDF
Level up your deployments for SQL Source Control
Red Gate Software
 
PDF
Key findings from the 2020 state of database dev ops report
Red Gate Software
 
PPTX
Extend DevOps to Your SQL Server Databases
Red Gate Software
 
PDF
2019 year in review slides
Red Gate Software
 
PPTX
What we learned at PASS Summit in 2019
Red Gate Software
 
PPTX
Quality in Software Development: Anglia Ruskin University
Red Gate Software
 
PPTX
How SQL Change Automation helps you deliver value faster
Red Gate Software
 
PPTX
DevOps essentials from Abel Wang and Steve Jones
Red Gate Software
 
PPTX
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
Red Gate Software
 
PDF
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Red Gate Software
 
PDF
How to Pitch a Software Development Initiative and Ignite Culture Change
Red Gate Software
 
PDF
Taming the Wild West
Red Gate Software
 
PDF
Standardize Database Development Across your Organization in 4 Key Steps
Red Gate Software
 
PDF
Data Privacy Next Steps -Compliant Database DevOps
Red Gate Software
 
PDF
Easing the transition from shared to dedicated database development
Red Gate Software
 
PPTX
Scaling compliant database dev ops at the enterprise level
Red Gate Software
 
Embracing DevOps through database migrations with Flyway
Red Gate Software
 
Database DevOps for Managed Service Providers
Red Gate Software
 
Mizuho Financial: Launching our Database DevOps journey
Red Gate Software
 
7 steps to effective SQL Server monitoring
Red Gate Software
 
Level up your deployments for SQL Source Control
Red Gate Software
 
Key findings from the 2020 state of database dev ops report
Red Gate Software
 
Extend DevOps to Your SQL Server Databases
Red Gate Software
 
2019 year in review slides
Red Gate Software
 
What we learned at PASS Summit in 2019
Red Gate Software
 
Quality in Software Development: Anglia Ruskin University
Red Gate Software
 
How SQL Change Automation helps you deliver value faster
Red Gate Software
 
DevOps essentials from Abel Wang and Steve Jones
Red Gate Software
 
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
Red Gate Software
 
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Red Gate Software
 
How to Pitch a Software Development Initiative and Ignite Culture Change
Red Gate Software
 
Taming the Wild West
Red Gate Software
 
Standardize Database Development Across your Organization in 4 Key Steps
Red Gate Software
 
Data Privacy Next Steps -Compliant Database DevOps
Red Gate Software
 
Easing the transition from shared to dedicated database development
Red Gate Software
 
Scaling compliant database dev ops at the enterprise level
Red Gate Software
 

Recently uploaded (20)

PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 

Database automated build and test - SQL In The City Cambridge

  • 1. #sqlinthecity Automated Build and Test (or continuous integration) (for your database) David Atkinson Product Manager, Red Gate [email protected]
  • 2. #sqlinthecity What will we cover today? Database build automation: What, Why, How Practical Demo Questions encouraged!
  • 3. #sqlinthecity Show of hands: How agile is your database development? 1. Database objects/scripts aren’t in version control 2. Database objects/scripts are in version control 3. An automated build system exists to build and test the database 4. An automated release system is used to promote your database to your environments
  • 4. #sqlinthecity How agile is your database development? 1. Database objects/scripts aren’t in version control 2. Database objects/scripts are in version control 3. An automated build system exists to build and test the database 4. An automated release system is used to promote your database to your environments
  • 5. #sqlinthecity What is continuous integration? “Continuous Integration is a practice designed to ensure that your software is always working, and that you get comprehensive feedback in a few minutes as to whether any given change to your system has broken it.” Jez Humble, ThoughtWorks, author of “Continuous Delivery”
  • 6. database #sqlinthecity What is continuous integration? ^ “Database Continuous Integration is a practice designed to ensure that your database software is always working, and that you get comprehensive feedback in a few minutes as to whether any given change to your system has broken it.”
  • 8. #sqlinthecity What is build? • For application code = compile • For database code = database creation script – But only for a new installation! • Upgrade scripts required for existing installations – Need to preserve the state of the data
  • 9. #sqlinthecity What is test? • For .NET code, NUnit. – Runs on a developer’s machine and build server • What about the database? – tSQLt is an open source framework for testing SQL Server databases – SQL Test provides SSMS integration
  • 10. #sqlinthecity Demo background Two fictional developers, David and Grant, are working on the website, www.simpletalk.com, a community website for .NET and SQL Server developers The application comprises • An ASP.Net web application • A SQL Server database
  • 11. #sqlinthecity Demo background Continuous integration has been configured to: 1. Keep a test database up to date with the latest changes 2. Run automated tSQLt tests (on realistic amounts of data) 3. Generate up-to-date documentation 4. Generate deployment scripts
  • 12. #sqlinthecity Demo background A few improvements are being made to Simple Talk. These changes will be deployed to production. But… only when the dev team has demonstrated that the changes work!
  • 13. #sqlinthecity Tools used • TeamCity (CI tool from JetBrains) • SQL Automation Pack (includes TeamCity plugin) • Glimpse (open source) From the SQL Developer Bundle: • • • • SQL Source Control SQL Test (tSQLt unit testing framework) SQL Data Generator SQL Doc
  • 15. Custom Migration Scripts An introduction #sqlinthecity
  • 17. #sqlinthecity How changes are made create table modify procedure 1 2 3 delete column create trigger drop view 4 5 6
  • 18. #sqlinthecity How changes are made create table modify procedure 1 2 modify trigger create function 7 3 drop procedure 8 4 10 6 5 create view modify function 9 delete column create trigger drop view create procedure 11 12
  • 19. #sqlinthecity How SQL Compare sees the world 1 12
  • 20. #sqlinthecity But not all changes can be inferred 1 2 3 5 column rename merge table 8 merge column split column 9 6 add NOT NULL column without DEFAULT table rename split table 7 4 10 11 data transformation data motion 12
  • 21. #sqlinthecity SQL Compare and SQL Source Control support custom migration scripts 1 2 3 4 5 6 11 12 Custom migration script 7 8 9 10
  • 22. #sqlinthecity Deployment script with migration scripts 1 12
  • 25. #sqlinthecity Recap: database CI 1. Incrementally keeps a test database up to date 2. Runs tSQLt tests on a database with realistic amounts of data 3. Generates always-up-to-date documentation 4. Generates and validates deployment scripts 5. Publishes a Deployment Manager database package
  • 26. #sqlinthecity Recap of demo: writing a test 1. 2. 3. 4. 5. A new test is added Continuous Integration identifies a failure We reproduce the bug locally We fix the bug and test it We commit the fix to source control
  • 27. #sqlinthecity Recap: migration scripts 1. The fix sets the [PublishDate] column from NULL to NOT NULL 2. Grant’s “get latest” fails because existing data that has NULL values 3. The continuous integration build alerts us of the same issue 4. A migration script is added to UPDATE existing data prior to changing the column to NOT NULL 5. Get Latest becomes possible and the continuous integration build once again indicates working software
  • 28. #sqlinthecity Latest version at : www.red-gate.com/CI [email protected] Questions?

Editor's Notes

  • #4: Self-categorize
  • #8: CI server is set up by one person and the whole team of developers benefits.
  • #9: The testing of deployment scripts is customarily left to the end. => Issues with upgrades only found at the end of a project.
  • #10: Although CI catches issues that arise when developers have failed run tests locally, also solving a different problem:- Two incompatible changes committed by different developers- “Works on my machine” in development.Issues that only arise in more realistic integration environments.
  • #14: Show of hands for SQL Developer Bundle.TeamCity is used at Red Gate but *any* build server can be used, eg:Jenkins, Hudson, TFS Build, CruiseControl, Bamboo, etc.There is a sqlci.exe command line, and NAnt and MSBuild template wrappers available.