Download presentation
Presentation is loading. Please wait.
1
SSDT, Docker, and (Azure) DevOps
How to Make Your Database Builds a First Class CI/CD Citizen
2
Thanks to our GOLD Sponsor
3
Thanks to our SILVER Sponsors
4
What’s On Deck? Why Are We Here? SSDT Overview
Unit Testing? In a Database? Azure DevOps Builds – We Pull It All Together Questions
5
Why Do We Want To Do This Anyway?
6
First, Some Definitions
DevOps – A set of software development processes that combines software development and information technology operations to shorten the systems development lifecycle while delivering features, fixes, and updates frequently in close alignment with business objectives (Wikipedia) Continuous Integration (CI) – Integrating into a common branch frequently, building the code, and running automated unit tests to ensure the changes are valid Continuous Delivery (CD) – Automated release process that allows push button release of the CI artifacts
7
Why Use a CI/CD Process With DDL
Your data definition language is part of your codebase, just like the application code Practicing CI/CD in conjunction with storing your DDL in source control allows your developers to see changes as they happen and participate in the process You will share a common development, build, and deployment mechanism with your application developers You can definitively answer the question “what was deployed?” and can recreate the database shape to any point in time Building your database can help identify issues such as misspellings or missing objects
8
Intro (or Refresher) to Sql Server Data Tools
9
Unit Testing?
10
Unit Testing??? If you have business logic in your database, it needs to be tested somehow The output of functions and stored procedures can change (or stop working entirely) with DDL changes Using the tSQLt unit testing framework ( can help detect regressions in your code But…unit tests can only be effective when you run them, preferably in an automated fashion
11
Azure DevOps Builds
12
Things We Can Do To Improve and Extend This
Have a dedicated build server As you have seen, the build is very slow using only Azure-native components Handle data type changes This potentially involves both a pre-deployment script (to copy data out of the affected table) and a post-deployment script (to copy data back into it) These scripts will need to test whether the change is in place or not
13
What This Doesn’t Solve For
14
Some Things This Doesn’t Solve For (Directly)
Large-scale refactorings Load testing Cases where you need to specify a version in the database itself This is probably possible, but would require some serious scripting Your thoughts?
15
Questions?
16
Who am I? Dan Mallott Twitter: @DanielMallott
Github: LinkedIn: Principal for West Monroe Partners In the industry since 2011 Primary experience with SQL Server, starting with SQL Server 2005 Also worked with Oracle, PostgreSQL, and Cassandra Been both a DBA and a developer Have a couple Microsoft certifications DataStax Certified Professional
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.