SlideShare a Scribd company logo
CI Build Pipelines With Jenkins,
Docker and SQL Server
Chris Adkin
Who Do We Have Here Today ?
Some show of hands type questions
What Is Docker ? What Is Jenkins ?
 A continuous integration build
engine
 Written in Java
 Open Source
 Free !!! 
 Has its own conference
=> Jenkins World
 Virtual machines Vs Containers
 Containers and images
 Registries
 Pets and cattle
 The rise and rise of Docker . . .
 Orchestration
Why Use Jenkins ?
1. Plugin
support
Why Jenkins ?
Why Use Jenkins ?
2. Pipeline as code in two ‘Flavours’
Why Jenkins ?
Declarative pipeline syntax:
 Opinionated
 Highly readable
 Easy to learn
Scripted pipeline syntax:
 For ‘Power’ users
who want the
greatest degree of
flexibility
 Powerful, but harder
to learn than the
declarative pipeline
syntax
Why Use Jenkins ?
3. Docker pipeline
Why Jenkins ?
Why Use Jenkins ?
Why Jenkins ?
4. Jenkins shared libraries
=> enables code reuse across pipelines
5. Java based
=> runs in the same way wherever you can run Java
6. Light weight
=> the whole CI environment can be containerised
7. Community driven
=> evolves at pace
The
Best
Of the
Rest
Jenkins and The Public Cloud
 CloudBees => Jenkins-as-a-service
 Azure market place Jenkins vm image
 VSTS integration for Jenkins
What CI Value Do Containers Add ?
 Why use a full blown virtual or physical machine
for CI that is performed a few times a day ?
 Spin containers up on a free Linux distribution
 Great for performing pipeline steps in parallel
 Containers as build agents
 Entire build environment can be containerised
Demonstrations
May the demo gods
smile upon me this day !!!May
Demonstrations
. . . and finish here
A multi-branch build
pipeline using containers,
tSQLt, parallelism and
Docker volumes
We will start off simple here
A simple webhook triggered
build pipeline using a
non-containerised
SQL Server instance
1. Make a change to a SQL
Server Data Tools Project
2. Commit and push the
changes to a local GIT repo
3. A webhook
triggers the Jenkins
build
#1 A Simple Webhook Triggered Pipeline
GitHub repository
Points Of Interest In Demo #1
 A Git webhook
 Our first look at Jenkins-pipeline-as-code
 Configuring the msbuild plugin
 Use of stash to store the dacpac for later use
in the pipeline
1. Checkout
SSDT project
2. Build DACPAC
#2 A Pipeline Using A ‘Sidecar’ SQL Server Container
3. Spin-up container 5. Tear down
container
4. Deploy artefact
DACPAC
GitHub repository
Points Of Interest In Demo #2
 Using a pipeline stored under source code control
 Our first look at a declarative syntax pipeline in action
 Methods
 Jenkins built in support for powershell
 Wrapping steps in timeouts (a best practice)
Software Development In A Team
 Its highly likely that more than
one person is working on the
code at any one time
 Not a good practice for
everyone to work on the same
branch
We need a branching strategy !!!
1. Checkout SSDT
project
2. Build DACPAC
#3 A Multi-Branch Pipeline
3. Spin-up container
for the current branch
5. Tear down container
for the current branch
4. Deploy artefact
DACPAC
GitHub repository
Points Of Interest In Demo #3
 Our first look at a multi-branch pipeline in action
 Using ${BRANCH_NAME} to determine the
current branch
 Spinning up containers on different host ports
 The Jenkins sandbox
1. Checkout SSDT
project
2. Build DACPAC
GitHub repository
#4 A Multi-Branch Pipeline With tSQLt Testing
3. Spin-up
container
for the
current branch
6. Tear down
container
for the
current branch
4. Deploy artefact
DACPAC
5. Run tSQLt
tests
Points Of Interest In Demo #4
 Preparing the SQL Server container for CLR usage
 Invoking tSQLt tests
 Pipeline parameterisation
 Conditional build steps for forcing the tSQLt down
happy / un-happy test paths
 tSQLt result rendering with the Junit plugin
 “Unstable build” concept
1. Checkout SSDT
project
2. Build DACPAC
GitHub repository
#5 A Multi-Branch Pipeline With tSQLt Testing
and Parallism
3. Spin-up
container
for the
current branch
6. Tear down
container
for the
current branch
4. Deploy artefact
DACPAC
5. Run tSQLt
tests
// Parallel // Parallel
Points of
interest
The Problem With Containers
Managing state and container image size !
To minimize container image size:
 Use the smallest base images
available
 The builder pattern
To manage state:
 Use Docker volumes
The Docker “Elephant In The Room”
The Problem With Containers
Small Images Allow You To Do Some Cool Things !!!
The “Builder Pattern”
( Elephant in the room metaphor )
Source
code
Build
container
Tool chain
dacpac
Container
image
deployed
to registry
What about images that
need to be associated with
reasonably
sized data sets ?
The “Builder Pattern”
3. “Side car” Containers and Docker Volumes
1. Check out code
2. Use msbuild
to create DACPAC
3. Spin up a
container
with a volume
Name the volume
with: the branch,
build number and
project
Tests Pass
Keep the
volume
Tests fail
Remove the
volume
#6 A CI Workflow Using Docker Volumes
GitHub repository
Points Of Interest In Demo #6
 Docker volumes
 Jenkins nodes
 Use of the agent syntax in the declarative pipeline
 sh => for shelling out on Linux
Vs.
bat => for shelling out on Windows
Other Cool Things We Can Do
 Spin-up build slaves on a Kubernetes cluster
 Container-ize the entire build environment
 Create shared libraries to promote Groovy
script code reuse across pipelines
 Provide build status notifications via slack
 Update ticket management system (Jira)
with build status updates
Questions ?
etails
ChrisAdkin8
cadkin@purestorage.com
http://uk.linkedin.com/in/wollatondba
Sponsors

More Related Content

What's hot (20)

PPTX
Next-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
JavaDayUA
 
PPTX
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Slawa Giterman
 
PDF
Automate App Container Delivery with CI/CD and DevOps
Daniel Oh
 
PPT
Jenkins Scriptler in 90mins
Larry Cai
 
PDF
CI/CD with Docker on AWS
Hart Hoover
 
PPTX
CI/CD Pipeline with Docker
kushalsingh007
 
PDF
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Troublemaker Khunpech
 
PPTX
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Docker, Inc.
 
PDF
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
PPTX
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
Brian Dawson
 
PPTX
Jenkins days workshop pipelines - Eric Long
ericlongtx
 
PDF
Building an Extensible, Resumable DSL on Top of Apache Groovy
jgcloudbees
 
PDF
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Damien Duportal
 
PDF
Testing with Docker
toffermann
 
PPTX
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
PPTX
Javaone 2014 - Git & Docker with Jenkins
Andy Pemberton
 
PDF
OpenStack Preso: DevOps on Hybrid Infrastructure
rhirschfeld
 
PDF
Continuous Delivery with Jenkins Workflow
Udaypal Aarkoti
 
PDF
JUC Europe 2015: Scaling Your Jenkins Master with Docker
CloudBees
 
PDF
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Steffen Gebert
 
Next-gen DevOps engineering with Docker and Kubernetes by Antons Kranga
JavaDayUA
 
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Slawa Giterman
 
Automate App Container Delivery with CI/CD and DevOps
Daniel Oh
 
Jenkins Scriptler in 90mins
Larry Cai
 
CI/CD with Docker on AWS
Hart Hoover
 
CI/CD Pipeline with Docker
kushalsingh007
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Troublemaker Khunpech
 
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Docker, Inc.
 
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
Brian Dawson
 
Jenkins days workshop pipelines - Eric Long
ericlongtx
 
Building an Extensible, Resumable DSL on Top of Apache Groovy
jgcloudbees
 
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Damien Duportal
 
Testing with Docker
toffermann
 
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
Javaone 2014 - Git & Docker with Jenkins
Andy Pemberton
 
OpenStack Preso: DevOps on Hybrid Infrastructure
rhirschfeld
 
Continuous Delivery with Jenkins Workflow
Udaypal Aarkoti
 
JUC Europe 2015: Scaling Your Jenkins Master with Docker
CloudBees
 
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Steffen Gebert
 

Similar to Ci with jenkins docker and mssql belgium (20)

PDF
ExpoQA 2017 Docker and CI
ElasTest Project
 
PDF
Docker & ci
Patxi Gortázar
 
PPTX
IM5- Introduction to DevOps tooools.pptx
Kumkum296976
 
PPTX
Docker Meetup Paris: enterprise Docker
Arnaud MAZIN
 
PPTX
Docker and Jenkins Pipeline
Mark Waite
 
PPTX
MHA2018 - Docker and Jenkins Pipeline for Continuous integration - Mark Waite
AgileDenver
 
PDF
Kubernetes + Jenkins X: a Cloud Native Approach
Thessaloniki Software Testing and QA meetup
 
PDF
Building .NET Microservices
VMware Tanzu
 
PDF
Using Containers to More Effectively Manage DevOps Continuous Integration
Cognizant
 
PPTX
Continuous Integration and Deployment with Jenkins for PCF
Altoros
 
PPTX
JS Fest 2019. Алексей Бороденко. Windows Containers. Why should I care?
DevOps_Fest
 
PPTX
Continuous Integration and Deployment with Jenkins for PCF
VMware Tanzu
 
PDF
Docker and Puppet for Continuous Integration
Giacomo Vacca
 
PDF
LXC to Docker Via Continuous Delivery
Docker, Inc.
 
PPTX
Continuous Integration and Delivery using TeamCity and Jenkins
Mahmoud Ali
 
PPTX
Architecture evolution
amit bezalel
 
PDF
Cloud Native CI/CD with Jenkins X and Knative Pipelines
C4Media
 
PPT
Docker in the Wild
Christian Mague
 
PPT
Docker in the Wild
Chris Mague
 
PDF
Puzzle ITC Talk @Docker CH meetup CI CD_with_Openshift_0.2
Amrita Prasad
 
ExpoQA 2017 Docker and CI
ElasTest Project
 
Docker & ci
Patxi Gortázar
 
IM5- Introduction to DevOps tooools.pptx
Kumkum296976
 
Docker Meetup Paris: enterprise Docker
Arnaud MAZIN
 
Docker and Jenkins Pipeline
Mark Waite
 
MHA2018 - Docker and Jenkins Pipeline for Continuous integration - Mark Waite
AgileDenver
 
Kubernetes + Jenkins X: a Cloud Native Approach
Thessaloniki Software Testing and QA meetup
 
Building .NET Microservices
VMware Tanzu
 
Using Containers to More Effectively Manage DevOps Continuous Integration
Cognizant
 
Continuous Integration and Deployment with Jenkins for PCF
Altoros
 
JS Fest 2019. Алексей Бороденко. Windows Containers. Why should I care?
DevOps_Fest
 
Continuous Integration and Deployment with Jenkins for PCF
VMware Tanzu
 
Docker and Puppet for Continuous Integration
Giacomo Vacca
 
LXC to Docker Via Continuous Delivery
Docker, Inc.
 
Continuous Integration and Delivery using TeamCity and Jenkins
Mahmoud Ali
 
Architecture evolution
amit bezalel
 
Cloud Native CI/CD with Jenkins X and Knative Pipelines
C4Media
 
Docker in the Wild
Christian Mague
 
Docker in the Wild
Chris Mague
 
Puzzle ITC Talk @Docker CH meetup CI CD_with_Openshift_0.2
Amrita Prasad
 
Ad

More from Chris Adkin (17)

PDF
Bdc from bare metal to k8s
Chris Adkin
 
PPTX
Data weekender deploying prod grade sql 2019 big data clusters
Chris Adkin
 
PPTX
Data relay introduction to big data clusters
Chris Adkin
 
PPTX
Sql server scalability fundamentals
Chris Adkin
 
PPTX
Leveraging memory in sql server
Chris Adkin
 
PPTX
Super scaling singleton inserts
Chris Adkin
 
PPTX
Scaling sql server 2014 parallel insert
Chris Adkin
 
PPTX
Sql server engine cpu cache as the new ram
Chris Adkin
 
PPTX
Sql sever engine batch mode and cpu architectures
Chris Adkin
 
PPTX
An introduction to column store indexes and batch mode
Chris Adkin
 
PPTX
Column store indexes and batch processing mode (nx power lite)
Chris Adkin
 
PPTX
Scaling out SSIS with Parallelism, Diving Deep Into The Dataflow Engine
Chris Adkin
 
PPTX
Building scalable application with sql server
Chris Adkin
 
PDF
TSQL Coding Guidelines
Chris Adkin
 
PPT
J2EE Performance And Scalability Bp
Chris Adkin
 
PPT
J2EE Batch Processing
Chris Adkin
 
PPT
Oracle Sql Tuning
Chris Adkin
 
Bdc from bare metal to k8s
Chris Adkin
 
Data weekender deploying prod grade sql 2019 big data clusters
Chris Adkin
 
Data relay introduction to big data clusters
Chris Adkin
 
Sql server scalability fundamentals
Chris Adkin
 
Leveraging memory in sql server
Chris Adkin
 
Super scaling singleton inserts
Chris Adkin
 
Scaling sql server 2014 parallel insert
Chris Adkin
 
Sql server engine cpu cache as the new ram
Chris Adkin
 
Sql sever engine batch mode and cpu architectures
Chris Adkin
 
An introduction to column store indexes and batch mode
Chris Adkin
 
Column store indexes and batch processing mode (nx power lite)
Chris Adkin
 
Scaling out SSIS with Parallelism, Diving Deep Into The Dataflow Engine
Chris Adkin
 
Building scalable application with sql server
Chris Adkin
 
TSQL Coding Guidelines
Chris Adkin
 
J2EE Performance And Scalability Bp
Chris Adkin
 
J2EE Batch Processing
Chris Adkin
 
Oracle Sql Tuning
Chris Adkin
 
Ad

Recently uploaded (20)

PPTX
Module-5-Measures-of-Central-Tendency-Grouped-Data-1.pptx
lacsonjhoma0407
 
PPTX
Rational Functions, Equations, and Inequalities (1).pptx
mdregaspi24
 
PPTX
AI Presentation Tool Pitch Deck Presentation.pptx
ShyamPanthavoor1
 
PDF
Early_Diabetes_Detection_using_Machine_L.pdf
maria879693
 
PPTX
Human-Action-Recognition-Understanding-Behavior.pptx
nreddyjanga
 
PDF
apidays Helsinki & North 2025 - REST in Peace? Hunting the Dominant Design fo...
apidays
 
PPTX
Rocket-Launched-PowerPoint-Template.pptx
Arden31
 
PPTX
Exploring Multilingual Embeddings for Italian Semantic Search: A Pretrained a...
Sease
 
PDF
Context Engineering for AI Agents, approaches, memories.pdf
Tamanna
 
PDF
Product Management in HealthTech (Case Studies from SnappDoctor)
Hamed Shams
 
PPTX
GenAI-Introduction-to-Copilot-for-Bing-March-2025-FOR-HUB.pptx
cleydsonborges1
 
PDF
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays
 
PDF
Choosing the Right Database for Indexing.pdf
Tamanna
 
PDF
MusicVideoProjectRubric Animation production music video.pdf
ALBERTIANCASUGA
 
PPTX
Resmed Rady Landis May 4th - analytics.pptx
Adrian Limanto
 
PDF
Web Scraping with Google Gemini 2.0 .pdf
Tamanna
 
PPT
deep dive data management sharepoint apps.ppt
novaprofk
 
PDF
OPPOTUS - Malaysias on Malaysia 1Q2025.pdf
Oppotus
 
PPTX
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays
 
PDF
List of all the AI prompt cheat codes.pdf
Avijit Kumar Roy
 
Module-5-Measures-of-Central-Tendency-Grouped-Data-1.pptx
lacsonjhoma0407
 
Rational Functions, Equations, and Inequalities (1).pptx
mdregaspi24
 
AI Presentation Tool Pitch Deck Presentation.pptx
ShyamPanthavoor1
 
Early_Diabetes_Detection_using_Machine_L.pdf
maria879693
 
Human-Action-Recognition-Understanding-Behavior.pptx
nreddyjanga
 
apidays Helsinki & North 2025 - REST in Peace? Hunting the Dominant Design fo...
apidays
 
Rocket-Launched-PowerPoint-Template.pptx
Arden31
 
Exploring Multilingual Embeddings for Italian Semantic Search: A Pretrained a...
Sease
 
Context Engineering for AI Agents, approaches, memories.pdf
Tamanna
 
Product Management in HealthTech (Case Studies from SnappDoctor)
Hamed Shams
 
GenAI-Introduction-to-Copilot-for-Bing-March-2025-FOR-HUB.pptx
cleydsonborges1
 
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays
 
Choosing the Right Database for Indexing.pdf
Tamanna
 
MusicVideoProjectRubric Animation production music video.pdf
ALBERTIANCASUGA
 
Resmed Rady Landis May 4th - analytics.pptx
Adrian Limanto
 
Web Scraping with Google Gemini 2.0 .pdf
Tamanna
 
deep dive data management sharepoint apps.ppt
novaprofk
 
OPPOTUS - Malaysias on Malaysia 1Q2025.pdf
Oppotus
 
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays
 
List of all the AI prompt cheat codes.pdf
Avijit Kumar Roy
 

Ci with jenkins docker and mssql belgium

  • 1. CI Build Pipelines With Jenkins, Docker and SQL Server Chris Adkin
  • 2. Who Do We Have Here Today ? Some show of hands type questions
  • 3. What Is Docker ? What Is Jenkins ?  A continuous integration build engine  Written in Java  Open Source  Free !!!   Has its own conference => Jenkins World  Virtual machines Vs Containers  Containers and images  Registries  Pets and cattle  The rise and rise of Docker . . .  Orchestration
  • 4. Why Use Jenkins ? 1. Plugin support Why Jenkins ?
  • 5. Why Use Jenkins ? 2. Pipeline as code in two ‘Flavours’ Why Jenkins ? Declarative pipeline syntax:  Opinionated  Highly readable  Easy to learn Scripted pipeline syntax:  For ‘Power’ users who want the greatest degree of flexibility  Powerful, but harder to learn than the declarative pipeline syntax
  • 6. Why Use Jenkins ? 3. Docker pipeline Why Jenkins ?
  • 7. Why Use Jenkins ? Why Jenkins ? 4. Jenkins shared libraries => enables code reuse across pipelines 5. Java based => runs in the same way wherever you can run Java 6. Light weight => the whole CI environment can be containerised 7. Community driven => evolves at pace The Best Of the Rest
  • 8. Jenkins and The Public Cloud  CloudBees => Jenkins-as-a-service  Azure market place Jenkins vm image  VSTS integration for Jenkins
  • 9. What CI Value Do Containers Add ?  Why use a full blown virtual or physical machine for CI that is performed a few times a day ?  Spin containers up on a free Linux distribution  Great for performing pipeline steps in parallel  Containers as build agents  Entire build environment can be containerised
  • 10. Demonstrations May the demo gods smile upon me this day !!!May Demonstrations . . . and finish here A multi-branch build pipeline using containers, tSQLt, parallelism and Docker volumes We will start off simple here A simple webhook triggered build pipeline using a non-containerised SQL Server instance
  • 11. 1. Make a change to a SQL Server Data Tools Project 2. Commit and push the changes to a local GIT repo 3. A webhook triggers the Jenkins build #1 A Simple Webhook Triggered Pipeline GitHub repository
  • 12. Points Of Interest In Demo #1  A Git webhook  Our first look at Jenkins-pipeline-as-code  Configuring the msbuild plugin  Use of stash to store the dacpac for later use in the pipeline
  • 13. 1. Checkout SSDT project 2. Build DACPAC #2 A Pipeline Using A ‘Sidecar’ SQL Server Container 3. Spin-up container 5. Tear down container 4. Deploy artefact DACPAC GitHub repository
  • 14. Points Of Interest In Demo #2  Using a pipeline stored under source code control  Our first look at a declarative syntax pipeline in action  Methods  Jenkins built in support for powershell  Wrapping steps in timeouts (a best practice)
  • 15. Software Development In A Team  Its highly likely that more than one person is working on the code at any one time  Not a good practice for everyone to work on the same branch We need a branching strategy !!!
  • 16. 1. Checkout SSDT project 2. Build DACPAC #3 A Multi-Branch Pipeline 3. Spin-up container for the current branch 5. Tear down container for the current branch 4. Deploy artefact DACPAC GitHub repository
  • 17. Points Of Interest In Demo #3  Our first look at a multi-branch pipeline in action  Using ${BRANCH_NAME} to determine the current branch  Spinning up containers on different host ports  The Jenkins sandbox
  • 18. 1. Checkout SSDT project 2. Build DACPAC GitHub repository #4 A Multi-Branch Pipeline With tSQLt Testing 3. Spin-up container for the current branch 6. Tear down container for the current branch 4. Deploy artefact DACPAC 5. Run tSQLt tests
  • 19. Points Of Interest In Demo #4  Preparing the SQL Server container for CLR usage  Invoking tSQLt tests  Pipeline parameterisation  Conditional build steps for forcing the tSQLt down happy / un-happy test paths  tSQLt result rendering with the Junit plugin  “Unstable build” concept
  • 20. 1. Checkout SSDT project 2. Build DACPAC GitHub repository #5 A Multi-Branch Pipeline With tSQLt Testing and Parallism 3. Spin-up container for the current branch 6. Tear down container for the current branch 4. Deploy artefact DACPAC 5. Run tSQLt tests // Parallel // Parallel Points of interest
  • 21. The Problem With Containers Managing state and container image size ! To minimize container image size:  Use the smallest base images available  The builder pattern To manage state:  Use Docker volumes The Docker “Elephant In The Room”
  • 22. The Problem With Containers Small Images Allow You To Do Some Cool Things !!!
  • 23. The “Builder Pattern” ( Elephant in the room metaphor ) Source code Build container Tool chain dacpac Container image deployed to registry What about images that need to be associated with reasonably sized data sets ? The “Builder Pattern”
  • 24. 3. “Side car” Containers and Docker Volumes 1. Check out code 2. Use msbuild to create DACPAC 3. Spin up a container with a volume Name the volume with: the branch, build number and project Tests Pass Keep the volume Tests fail Remove the volume #6 A CI Workflow Using Docker Volumes GitHub repository
  • 25. Points Of Interest In Demo #6  Docker volumes  Jenkins nodes  Use of the agent syntax in the declarative pipeline  sh => for shelling out on Linux Vs. bat => for shelling out on Windows
  • 26. Other Cool Things We Can Do  Spin-up build slaves on a Kubernetes cluster  Container-ize the entire build environment  Create shared libraries to promote Groovy script code reuse across pipelines  Provide build status notifications via slack  Update ticket management system (Jira) with build status updates

Editor's Notes

  • #5: There is a tremendously rich plugins eco-system for Jenkins, generally speaking Jenkins always tends to be the first CI engine to receive open-source plugin support.