SlideShare a Scribd company logo
1 of 39
#sqlinthecity 
Automated database build and 
test with TeamCity 
SITC Workshop Cambridge, UK
What is CI? 
#sqlinthecity 
• Continuous Integration (CI) is a development 
practice that requires developers to integrate code 
into a shared repository several times a day. Each 
check-in is then verified by an automated build, 
allowing teams to detect problems early.
What is database CI? 
• It’s the same! 
#sqlinthecity 
• Applying the same approach to the database as we 
do for the application
The road to database CI 
1. Source control 
2. Automated builds 
3. Automated tests 
4. Frequent check ins of small changes 
#sqlinthecity 

The road to database CI 
1. Source control 
2. Automated builds 
3. Automated tests 
4. Frequent check ins of small changes 
#sqlinthecity
Advantages of Automated Builds 
• Early warning of broken code 
• Constant availability of a "current" build 
• Don’t continue developing on a broken foundation 
• Many more…. 
#sqlinthecity
Goals of today’s workshop 
1. Link a source control repository to a build system 
2. Use the SQLCI resources to implement build steps that: 
• Verify that your database code has built successfully 
• Verify an upgrade to an existing database 
• Run database unit tests 
3. Trigger builds automatically on changes being checked in to 
source control 
4. Introduce artifacts as the basis for future repeatable 
deployments 
#sqlinthecity
• Plugin for TeamCity 
• Part of the Red Gate SQL Automation Pack 
• Includes 3 build runners: 
• Build 
• Sync 
• Test 
#sqlinthecity 
SQLCI Plugin – What is it?
SQLCI 
#sqlinthecity
• Subversion(SVN) 
• SQL Server 2012 
• SQL Source Control 
• TeamCity 
#sqlinthecity 
Current setup
Creating a project 
• Creating a new TeamCity Project 
• Adding a VCS Root 
#sqlinthecity
The Build Step… 
#sqlinthecity 
CREATE 
TABLE 
foo… 
Does creation 
script run? 
? 
1. Convert scripts 
folder into 
package 
2. Generate the 
creation script 
3. Validate creation 
script
The Build Step… 
#sqlinthecity
Triggering… 
#sqlinthecity
Triggering… 
#sqlinthecity 
• Check it works so far.
Break time! 
#sqlinthecity
The Sync Step… 
#sqlinthecity 
1. Apply package version 
to target database 
2. Deployment 
validation 
(is the target the 
same as the 
package?) 
V1.1 
V1.2 
compare
The Sync Step… 
#sqlinthecity
The Sync Step… 
• Check it works so far. 
#sqlinthecity
Capturing an upgrade script… 
/scriptFile:“<FilePath>“ 
#sqlinthecity 
We can use %build.number% to grab the current build 
number.
Review… 
#sqlinthecity
Try it for yourself…. 
• SQLServerCentral 
#sqlinthecity
Lunch time! 
#sqlinthecity
The road to database CI 
1. Source control 
2. Automated builds 
3. Automated tests 
4. Frequent check ins of small changes 
#sqlinthecity 

The road to database CI 
1. Source control 
2. Automated builds 
3. Automated tests 
4. Frequent check ins of small changes 
#sqlinthecity
Advantages of Automated Tests 
• Early warning of broken code 
• Constant validation of existing functionality 
• Detect when new changes introduce errors 
• Feedback on the current state of the code 
• Many more…. 
#sqlinthecity
SQL Test – What is it? 
#sqlinthecity 
• Add-in for SQL Server Management Studio 
• Builds upon tSQLt framework 
• Adds a simple UI for creating, managing and running 
database unit tests. 
• All tests are written in T-SQL 
www.tsqlt.org
Add database to SQL Test 
#sqlinthecity
Add a test
Manually running the tests… 
• Check it works so far. 
#sqlinthecity
Automating tests 
#sqlinthecity
The Test Step… 
#sqlinthecity 
1. Build empty test 
database from 
package 
2. Populate a new 
database with test 
data (optional) 
3. Run tSQLt unit tests 
(report in JUnit 
format)
The Test Step… 
• Practical 
– sqlCI.exe Sync 
/package= <values5,2,3> 
/databaseServer=<value6> 
/databaseName=<value7> 
Optionally supply SQL Server Credentials 
#sqlinthecity
The Test Step… 
• Run the build 
#sqlinthecity
The Test Step… 
• Break the build 
#sqlinthecity
Review… 
#sqlinthecity
Break time! 
#sqlinthecity
Try it for yourself…. 
• SQLServerCentral 
#sqlinthecity 
– How about a test to check the name added by the 
sproc?
Contact info 
• Tom Austin 
– Pre Sales Engineer at Red Gate 
– Email: tom.austin@red-gate.com 
www.red-gate.com/ci 
#sqlinthecity

More Related Content

What's hot

Jenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshopJenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshopYoram Michaeli
 
Chicago alm user group tfs version control poster - tfvc and git
Chicago alm user group   tfs version control poster - tfvc and gitChicago alm user group   tfs version control poster - tfvc and git
Chicago alm user group tfs version control poster - tfvc and gitDave Burnison
 
Continuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for SalesforceContinuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for SalesforceKlea Kolaric
 
Mozilla: Mozmill meets L10n
Mozilla: Mozmill meets L10nMozilla: Mozmill meets L10n
Mozilla: Mozmill meets L10nHenrik Skupin
 
Make sure your code works
Make sure your code worksMake sure your code works
Make sure your code worksHenrik Skupin
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperMike Melusky
 
Jenkins Pipelining and Gatling Integration
Jenkins Pipelining and  Gatling IntegrationJenkins Pipelining and  Gatling Integration
Jenkins Pipelining and Gatling IntegrationKnoldus Inc.
 
NIWeek 2017 - Automated Test of LabVIEW FPGA Code: CI and Jenkins 2 Pipelines
NIWeek 2017 - Automated Test of LabVIEW FPGA Code: CI and Jenkins 2 PipelinesNIWeek 2017 - Automated Test of LabVIEW FPGA Code: CI and Jenkins 2 Pipelines
NIWeek 2017 - Automated Test of LabVIEW FPGA Code: CI and Jenkins 2 PipelinesChing-Hwa Yu
 
Distribute your code with NUget and build vNext
Distribute your code with NUget and build vNextDistribute your code with NUget and build vNext
Distribute your code with NUget and build vNextGian Maria Ricci
 
Crowd-sourced Automated Firefox UI Testing
Crowd-sourced Automated Firefox UI TestingCrowd-sourced Automated Firefox UI Testing
Crowd-sourced Automated Firefox UI TestingHenrik Skupin
 
Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introductionGourav Varma
 
Deploy applications with TFS Build
Deploy applications with TFS BuildDeploy applications with TFS Build
Deploy applications with TFS BuildGian Maria Ricci
 
Testing JSF with Arquillian and Selenium
Testing JSF with Arquillian and SeleniumTesting JSF with Arquillian and Selenium
Testing JSF with Arquillian and SeleniumLukáš Fryč
 

What's hot (18)

FV04_MostoviczT_RAD
FV04_MostoviczT_RADFV04_MostoviczT_RAD
FV04_MostoviczT_RAD
 
Jenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshopJenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshop
 
Chicago alm user group tfs version control poster - tfvc and git
Chicago alm user group   tfs version control poster - tfvc and gitChicago alm user group   tfs version control poster - tfvc and git
Chicago alm user group tfs version control poster - tfvc and git
 
Continuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for SalesforceContinuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for Salesforce
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
Mozilla: Mozmill meets L10n
Mozilla: Mozmill meets L10nMozilla: Mozmill meets L10n
Mozilla: Mozmill meets L10n
 
Make sure your code works
Make sure your code worksMake sure your code works
Make sure your code works
 
Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
 
Graphql usage
Graphql usageGraphql usage
Graphql usage
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
 
Jenkins Pipelining and Gatling Integration
Jenkins Pipelining and  Gatling IntegrationJenkins Pipelining and  Gatling Integration
Jenkins Pipelining and Gatling Integration
 
NIWeek 2017 - Automated Test of LabVIEW FPGA Code: CI and Jenkins 2 Pipelines
NIWeek 2017 - Automated Test of LabVIEW FPGA Code: CI and Jenkins 2 PipelinesNIWeek 2017 - Automated Test of LabVIEW FPGA Code: CI and Jenkins 2 Pipelines
NIWeek 2017 - Automated Test of LabVIEW FPGA Code: CI and Jenkins 2 Pipelines
 
Distribute your code with NUget and build vNext
Distribute your code with NUget and build vNextDistribute your code with NUget and build vNext
Distribute your code with NUget and build vNext
 
Crowd-sourced Automated Firefox UI Testing
Crowd-sourced Automated Firefox UI TestingCrowd-sourced Automated Firefox UI Testing
Crowd-sourced Automated Firefox UI Testing
 
Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introduction
 
CI with TFS
CI with TFSCI with TFS
CI with TFS
 
Deploy applications with TFS Build
Deploy applications with TFS BuildDeploy applications with TFS Build
Deploy applications with TFS Build
 
Testing JSF with Arquillian and Selenium
Testing JSF with Arquillian and SeleniumTesting JSF with Arquillian and Selenium
Testing JSF with Arquillian and Selenium
 

Similar to Part of the DLM Story: Automated database build and test with TeamCity

Supercharge Your Continuous Integration Deployments
Supercharge Your Continuous Integration DeploymentsSupercharge Your Continuous Integration Deployments
Supercharge Your Continuous Integration DeploymentsNikola Gotsev
 
Continuous integration with teamcity
Continuous integration with teamcityContinuous integration with teamcity
Continuous integration with teamcityEugene Sheretov
 
Continuous deployment steve povilaitis
Continuous deployment   steve povilaitisContinuous deployment   steve povilaitis
Continuous deployment steve povilaitisSteve Povilaitis
 
Best Practices for Database Deployments
Best Practices for Database DeploymentsBest Practices for Database Deployments
Best Practices for Database DeploymentsRed Gate Software
 
Hudson
HudsonHudson
Hudson8x8
 
Introduction to jenkins for the net developer
Introduction to jenkins for the net developerIntroduction to jenkins for the net developer
Introduction to jenkins for the net developerAbe Diaz
 
Database continuous integration, unit test and functional test
Database continuous integration, unit test and functional testDatabase continuous integration, unit test and functional test
Database continuous integration, unit test and functional testHarry Zheng
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkinsAbe Diaz
 
Database Build and Release - SQL In The City - Ernest Hwang
Database Build and Release - SQL In The City - Ernest HwangDatabase Build and Release - SQL In The City - Ernest Hwang
Database Build and Release - SQL In The City - Ernest HwangRed Gate Software
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applicationsSunil Dalal
 
Why NXTware Remote for Jenkins
Why NXTware Remote for JenkinsWhy NXTware Remote for Jenkins
Why NXTware Remote for Jenkinsecubemarketing
 
Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...
Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...
Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...DevOps4Networks
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationFaisal Farooq
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdfMahmoudAlnmr1
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous IntegrationZahra Golmirzaei
 
Test parallelization using Jenkins
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using JenkinsRogue Wave Software
 
Continuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with JenkinsContinuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with Jenkinsecubemarketing
 

Similar to Part of the DLM Story: Automated database build and test with TeamCity (20)

Supercharge Your Continuous Integration Deployments
Supercharge Your Continuous Integration DeploymentsSupercharge Your Continuous Integration Deployments
Supercharge Your Continuous Integration Deployments
 
Continuous integration with teamcity
Continuous integration with teamcityContinuous integration with teamcity
Continuous integration with teamcity
 
Continuous deployment steve povilaitis
Continuous deployment   steve povilaitisContinuous deployment   steve povilaitis
Continuous deployment steve povilaitis
 
Best Practices for Database Deployments
Best Practices for Database DeploymentsBest Practices for Database Deployments
Best Practices for Database Deployments
 
Hudson
HudsonHudson
Hudson
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Introduction to jenkins for the net developer
Introduction to jenkins for the net developerIntroduction to jenkins for the net developer
Introduction to jenkins for the net developer
 
Database continuous integration, unit test and functional test
Database continuous integration, unit test and functional testDatabase continuous integration, unit test and functional test
Database continuous integration, unit test and functional test
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Database Build and Release - SQL In The City - Ernest Hwang
Database Build and Release - SQL In The City - Ernest HwangDatabase Build and Release - SQL In The City - Ernest Hwang
Database Build and Release - SQL In The City - Ernest Hwang
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applications
 
Why NXTware Remote for Jenkins
Why NXTware Remote for JenkinsWhy NXTware Remote for Jenkins
Why NXTware Remote for Jenkins
 
Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...
Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...
Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdf
 
jenkins.pdf
jenkins.pdfjenkins.pdf
jenkins.pdf
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous Integration
 
Test parallelization using Jenkins
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using Jenkins
 
Continuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with JenkinsContinuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with Jenkins
 
Dev ops using Jenkins
Dev ops using JenkinsDev ops using Jenkins
Dev ops using Jenkins
 

More from Red Gate Software

The future of DevOps: fully left-shifted deployments with version control and...
The future of DevOps: fully left-shifted deployments with version control and...The future of DevOps: fully left-shifted deployments with version control and...
The future of DevOps: fully left-shifted deployments with version control and...Red Gate Software
 
Embracing DevOps through database migrations with Flyway
Embracing DevOps through database migrations with FlywayEmbracing DevOps through database migrations with Flyway
Embracing DevOps through database migrations with FlywayRed Gate Software
 
Database DevOps for Managed Service Providers
Database DevOps for Managed Service ProvidersDatabase DevOps for Managed Service Providers
Database DevOps for Managed Service ProvidersRed Gate Software
 
Mizuho Financial: Launching our Database DevOps journey
Mizuho Financial: Launching our Database DevOps journeyMizuho Financial: Launching our Database DevOps journey
Mizuho Financial: Launching our Database DevOps journeyRed Gate Software
 
7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoring7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoringRed Gate Software
 
Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control Red Gate Software
 
Key findings from the 2020 state of database dev ops report
Key findings from the 2020 state of database dev ops reportKey findings from the 2020 state of database dev ops report
Key findings from the 2020 state of database dev ops reportRed Gate Software
 
Extend DevOps to Your SQL Server Databases
Extend DevOps to Your SQL Server DatabasesExtend DevOps to Your SQL Server Databases
Extend DevOps to Your SQL Server DatabasesRed Gate Software
 
What we learned at PASS Summit in 2019
What we learned at PASS Summit in 2019What we learned at PASS Summit in 2019
What we learned at PASS Summit in 2019Red Gate Software
 
Quality in Software Development: Anglia Ruskin University
Quality in Software Development: Anglia Ruskin UniversityQuality in Software Development: Anglia Ruskin University
Quality in Software Development: Anglia Ruskin UniversityRed Gate Software
 
How SQL Change Automation helps you deliver value faster
How SQL Change Automation helps you deliver value fasterHow SQL Change Automation helps you deliver value faster
How SQL Change Automation helps you deliver value fasterRed Gate Software
 
DevOps essentials from Abel Wang and Steve Jones
DevOps essentials from Abel Wang and Steve JonesDevOps essentials from Abel Wang and Steve Jones
DevOps essentials from Abel Wang and Steve JonesRed Gate Software
 
Successfully migrating existing databases to Azure
Successfully migrating existing databases to AzureSuccessfully migrating existing databases to Azure
Successfully migrating existing databases to AzureRed Gate Software
 
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
The Ultimate Guide to Choosing and Implementing the Right Monitoring ToolThe Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
The Ultimate Guide to Choosing and Implementing the Right Monitoring ToolRed Gate Software
 
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...Red Gate Software
 
Using Redgate, AKS and Azure to bring DevOps to your database
Using Redgate, AKS and Azure to bring DevOps to your databaseUsing Redgate, AKS and Azure to bring DevOps to your database
Using Redgate, AKS and Azure to bring DevOps to your databaseRed Gate Software
 
Using Redgate, AKS and Azure to bring DevOps to your Database
Using Redgate, AKS and Azure to bring DevOps to your DatabaseUsing Redgate, AKS and Azure to bring DevOps to your Database
Using Redgate, AKS and Azure to bring DevOps to your DatabaseRed Gate Software
 
How to Pitch a Software Development Initiative and Ignite Culture Change
How to Pitch a Software Development Initiative and Ignite Culture ChangeHow to Pitch a Software Development Initiative and Ignite Culture Change
How to Pitch a Software Development Initiative and Ignite Culture ChangeRed Gate Software
 

More from Red Gate Software (20)

The future of DevOps: fully left-shifted deployments with version control and...
The future of DevOps: fully left-shifted deployments with version control and...The future of DevOps: fully left-shifted deployments with version control and...
The future of DevOps: fully left-shifted deployments with version control and...
 
Embracing DevOps through database migrations with Flyway
Embracing DevOps through database migrations with FlywayEmbracing DevOps through database migrations with Flyway
Embracing DevOps through database migrations with Flyway
 
Database DevOps for Managed Service Providers
Database DevOps for Managed Service ProvidersDatabase DevOps for Managed Service Providers
Database DevOps for Managed Service Providers
 
Mizuho Financial: Launching our Database DevOps journey
Mizuho Financial: Launching our Database DevOps journeyMizuho Financial: Launching our Database DevOps journey
Mizuho Financial: Launching our Database DevOps journey
 
7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoring7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoring
 
Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control
 
Key findings from the 2020 state of database dev ops report
Key findings from the 2020 state of database dev ops reportKey findings from the 2020 state of database dev ops report
Key findings from the 2020 state of database dev ops report
 
Extend DevOps to Your SQL Server Databases
Extend DevOps to Your SQL Server DatabasesExtend DevOps to Your SQL Server Databases
Extend DevOps to Your SQL Server Databases
 
2019 year in review slides
2019 year in review slides2019 year in review slides
2019 year in review slides
 
What we learned at PASS Summit in 2019
What we learned at PASS Summit in 2019What we learned at PASS Summit in 2019
What we learned at PASS Summit in 2019
 
Quality in Software Development: Anglia Ruskin University
Quality in Software Development: Anglia Ruskin UniversityQuality in Software Development: Anglia Ruskin University
Quality in Software Development: Anglia Ruskin University
 
How SQL Change Automation helps you deliver value faster
How SQL Change Automation helps you deliver value fasterHow SQL Change Automation helps you deliver value faster
How SQL Change Automation helps you deliver value faster
 
DevOps essentials from Abel Wang and Steve Jones
DevOps essentials from Abel Wang and Steve JonesDevOps essentials from Abel Wang and Steve Jones
DevOps essentials from Abel Wang and Steve Jones
 
Successfully migrating existing databases to Azure
Successfully migrating existing databases to AzureSuccessfully migrating existing databases to Azure
Successfully migrating existing databases to Azure
 
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
The Ultimate Guide to Choosing and Implementing the Right Monitoring ToolThe Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
 
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
 
Using Redgate, AKS and Azure to bring DevOps to your database
Using Redgate, AKS and Azure to bring DevOps to your databaseUsing Redgate, AKS and Azure to bring DevOps to your database
Using Redgate, AKS and Azure to bring DevOps to your database
 
Using Redgate, AKS and Azure to bring DevOps to your Database
Using Redgate, AKS and Azure to bring DevOps to your DatabaseUsing Redgate, AKS and Azure to bring DevOps to your Database
Using Redgate, AKS and Azure to bring DevOps to your Database
 
How to Pitch a Software Development Initiative and Ignite Culture Change
How to Pitch a Software Development Initiative and Ignite Culture ChangeHow to Pitch a Software Development Initiative and Ignite Culture Change
How to Pitch a Software Development Initiative and Ignite Culture Change
 
Taming the Wild West
Taming the Wild West Taming the Wild West
Taming the Wild West
 

Recently uploaded

React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 

Recently uploaded (20)

React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 

Part of the DLM Story: Automated database build and test with TeamCity

  • 1. #sqlinthecity Automated database build and test with TeamCity SITC Workshop Cambridge, UK
  • 2. What is CI? #sqlinthecity • Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
  • 3. What is database CI? • It’s the same! #sqlinthecity • Applying the same approach to the database as we do for the application
  • 4. The road to database CI 1. Source control 2. Automated builds 3. Automated tests 4. Frequent check ins of small changes #sqlinthecity 
  • 5. The road to database CI 1. Source control 2. Automated builds 3. Automated tests 4. Frequent check ins of small changes #sqlinthecity
  • 6. Advantages of Automated Builds • Early warning of broken code • Constant availability of a "current" build • Don’t continue developing on a broken foundation • Many more…. #sqlinthecity
  • 7. Goals of today’s workshop 1. Link a source control repository to a build system 2. Use the SQLCI resources to implement build steps that: • Verify that your database code has built successfully • Verify an upgrade to an existing database • Run database unit tests 3. Trigger builds automatically on changes being checked in to source control 4. Introduce artifacts as the basis for future repeatable deployments #sqlinthecity
  • 8. • Plugin for TeamCity • Part of the Red Gate SQL Automation Pack • Includes 3 build runners: • Build • Sync • Test #sqlinthecity SQLCI Plugin – What is it?
  • 10. • Subversion(SVN) • SQL Server 2012 • SQL Source Control • TeamCity #sqlinthecity Current setup
  • 11. Creating a project • Creating a new TeamCity Project • Adding a VCS Root #sqlinthecity
  • 12. The Build Step… #sqlinthecity CREATE TABLE foo… Does creation script run? ? 1. Convert scripts folder into package 2. Generate the creation script 3. Validate creation script
  • 13. The Build Step… #sqlinthecity
  • 15. Triggering… #sqlinthecity • Check it works so far.
  • 17. The Sync Step… #sqlinthecity 1. Apply package version to target database 2. Deployment validation (is the target the same as the package?) V1.1 V1.2 compare
  • 18. The Sync Step… #sqlinthecity
  • 19. The Sync Step… • Check it works so far. #sqlinthecity
  • 20. Capturing an upgrade script… /scriptFile:“<FilePath>“ #sqlinthecity We can use %build.number% to grab the current build number.
  • 22. Try it for yourself…. • SQLServerCentral #sqlinthecity
  • 24. The road to database CI 1. Source control 2. Automated builds 3. Automated tests 4. Frequent check ins of small changes #sqlinthecity 
  • 25. The road to database CI 1. Source control 2. Automated builds 3. Automated tests 4. Frequent check ins of small changes #sqlinthecity
  • 26. Advantages of Automated Tests • Early warning of broken code • Constant validation of existing functionality • Detect when new changes introduce errors • Feedback on the current state of the code • Many more…. #sqlinthecity
  • 27. SQL Test – What is it? #sqlinthecity • Add-in for SQL Server Management Studio • Builds upon tSQLt framework • Adds a simple UI for creating, managing and running database unit tests. • All tests are written in T-SQL www.tsqlt.org
  • 28. Add database to SQL Test #sqlinthecity
  • 30. Manually running the tests… • Check it works so far. #sqlinthecity
  • 32. The Test Step… #sqlinthecity 1. Build empty test database from package 2. Populate a new database with test data (optional) 3. Run tSQLt unit tests (report in JUnit format)
  • 33. The Test Step… • Practical – sqlCI.exe Sync /package= <values5,2,3> /databaseServer=<value6> /databaseName=<value7> Optionally supply SQL Server Credentials #sqlinthecity
  • 34. The Test Step… • Run the build #sqlinthecity
  • 35. The Test Step… • Break the build #sqlinthecity
  • 38. Try it for yourself…. • SQLServerCentral #sqlinthecity – How about a test to check the name added by the sproc?
  • 39. Contact info • Tom Austin – Pre Sales Engineer at Red Gate – Email: tom.austin@red-gate.com www.red-gate.com/ci #sqlinthecity