SlideShare a Scribd company logo
chris@exadat.com
exadat.co.ukChris Adkin chrisadkin.ioChris Adkin cadkin@purestorage.com
CI With Jenkins, Docker and SQL Server
Build Pipeline 101
2. Build code into a
deployable artefact
1. Check code
out of source
code control
3. Deploy code
to test target
4. Run Tests
 Apache Ant
 Apache Maven
 Gradle
 Microsoft
msbuild
 Git
 GitHub
 Bitbucket
 Team
Foundation
Server
 Containers
 Web servers
 Databases
 Public cloud
PaaS
 JUnit
 Selenium
 Mocha
 Pester
Build Pipeline As Code !!!
2. Build code into a
deployable artefact
1. Check code
out of source
code control
3. Deploy code
to test target
4. Run Tests
 Jenkins
 Groovy DSL
(DSL = Domain specific language)
 Jenkins script
 Jenkins declarative pipeline
 TFS / VSTS
 Pipeline as YAML in VSTS preview
 Coming to TFS sometime next year
The ‘New’ Build Pipeline
2. Build code into a
deployable artefact
1. Check code
out of source
code control
5. Deploy container
image to a registry
4. Run Tests
3. Deploy code
to test target
Builds Can Be Event Triggered
1. Checkout code 2. Build artefact 3. Deploy to target 4. Run Tests
Git/GitHub
webhooks
Visual studio
online project
service hooks
Wouldn’t it be nice if we could have event driven
builds and spin-up and then tare down the
deployment target ?
Containers To The Rescue !!!
 We can fully container-ise the
build environment
 Scale-out the build
infrastructure elastically using
containers
 Spin-up “Side car” containers
as deployment targets
 The “Builder pattern”
The ‘Builder’ Pattern
Spin-up a container to ‘Build’ the
artefact here
Deploy artefact to ‘Run’
container here
Rationale: keep the size of the ‘Run’ container image as small as possible
by not including the build tool chain
Build Engines – There Are Lots To Choose From !!!
 Jenkins:
 Great open-source plugin support
 Free
 Light weight
 Can be fully container-ised and scaled out with containers
 Strong build-pipeline-as-code support
 Multi-branch build pipelines
Jenkins Pipeline As Code: The Two Flavours
Scripted Pipeline Syntax
node {
stage('Example') {
try {
sh 'exit 1'
}
catch (exc) {
echo ‘Failure, sound the alarm!'
throw
}
}
}
Declarative Pipeline syntax
pipeline {
agent any
stages {
stage('Example') {
steps {
echo 'Hello World'
}
}
}
post {
always {
echo 'I will always say Hello again!'
}
}
}
https://jenkins.io/doc/book/pipeline/syntax/
Store Your Pipeline Alongside Your Code
Your pipeline
code goes in
here, this is for
multi-branch
pipelines
“Syntactic sugar” For Working With Containers
node('docker')
{
docker.withServer('tcp://docker.beedemo.net:2376', 'docker-beedemo-creds')
{
stage('Build Docker Image’)
{
def image = docker.build "cloudbees/mobile-deposit-api:${buildVersion}”
}
stage('Publish Docker Image’)
{
docker.withRegistry('https://registry.beedemo.net/', 'docker-registry-login')
{
image.push()
}
}
stage('Deploy Docker Image’)
{
def container = image.run('--name mobile-deposit-api -p 8080:8080')
}
}
}
Demonstrations
May the demonstration gods smile upon me
Demonstration: A Simple Web hook
sqlproj DACPAC
1. Open visual studio
project, make a
change and perform
a commit
2. Check code
out of git
3. Build DACPAC
from visual studio
project
4. Deploy code to
SQL Server
GitHub repo: https://github.com/chrisadkin/SsdtDevOpsDemo, Blog Post
Demonstration: A Multi-branch Build Pipeline
Master
HotFix
Feature
Jenkins creates a pipeline for each branch created from the master
GitHub repo: https://github.com/chrisadkin/SelfBuildPipeline, Blog Post
Demonstration: Using A Jenkins Build Slave
Jenkins Build Master
( orchestrate build here )
Jenkins Build Slave
( deploy to container here )
GitHub repo: https://github.com/chrisadkin/SelfBuildPipelineDV, Blog Post
Demonstration: Image Layering
Base Image
Intermediate images
Final Image
Pro Tip #1 Constructing Dockerfiles
Put slow and time
consuming operations
as close to the top of
the file as possible
Put fast operations
toward the bottom of
the Dockerfile
Pro Tip #2 Use of FROM Clauses In Dockerfiles
The Dockerfile should
only contain 1 FROM
clause
Pro Tip #3 Use Timeout Wrappers
timeout(time:2, unit:'MINUTES') {
bat "docker run -d -e ACCEPT_EULA=Y -e SA_PASSWORD=P@ssword1 --name
SQLLinuxmaster -d -i -p 15565:1433 microsoft/mssql-server-linux"
}
My samples do not use this feature, but you may wish to consider this
for pipelines used in actual production
Demonstration: A Fully Containerised Build Environment
Jenkins Master SQL Server “Side car”
Deployment target
GitHub repo: https://github.com/chrisadkin/SsdtJenkinsCiInDocker, Blog Post
Demonstration: Adding tSQLt Unit Testing To The Pipeline
sqlproj DACPAC
1. Open visual studio
project, make a
change and perform
a commit
2. Check code
out of git
3. Build DACPAC
from visual studio
project
4. Deploy code to
SQL Server
GitHub repo: https://github.com/chrisadkin/SelfBuildPipelineDV_tSQLt, Blog post coming soon . .
.
5. Run tSQLt
tests
Want To Get More Adventurous ?
 Scale out your build platform with build slaves as
containers
 Deploy Jenkins to Kubernetes
 Build shared groovy script libraries to share code
across pipelines
 Invoke builds from the REST API
Some Final Words
 Linux images tend to be smaller, faster and more stable than their windows
counterparts:
 windowsservercore 10.4 GB
 ubuntu 123 MB
 Alpine 3.97 MB ( .Net core 2.1 will run on this)
 Docker community edition can be temperamental
 People including myself have had difficulty getting the docker SQL Server lab to
work
 Jenkins is open source, things can break from one release to the next !!!
Further Reading
 Top 10 Jenkins best practices from CloudBees
 Jenkins Pipeline as code from Jenkins.io, includes:
 Demos
 Downloadable examples
 Articles
 Blogposts
 Recordings
. . . any questions
Ad

Recommended

Ci with jenkins docker and mssql belgium
Ci with jenkins docker and mssql belgium
Chris Adkin
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
Brian Dawson
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Troublemaker Khunpech
 
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Slawa Giterman
 
Exploring Docker in CI/CD
Exploring Docker in CI/CD
Henry Huang
 
Continuous Delivery Pipeline with Docker and Jenkins
Continuous Delivery Pipeline with Docker and Jenkins
Camilo Ribeiro
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
Tomohide Kakeya
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
Dennys Hsieh
 
Jenkins, pipeline and docker
Jenkins, pipeline and docker
AgileDenver
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
Steffen Gebert
 
CI and CD with Jenkins
CI and CD with Jenkins
Martin Málek
 
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
CloudBees
 
Jenkins & IaC
Jenkins & IaC
HungWei Chiu
 
Yale Jenkins Show and Tell
Yale Jenkins Show and Tell
E. Camden Fisher
 
Continuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins Workflow
Udaypal Aarkoti
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
Francesco Bruni
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
Andy Pemberton
 
Jenkins Scriptler in 90mins
Jenkins Scriptler in 90mins
Larry Cai
 
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
Simon McCartney
 
Introduction to jenkins
Introduction to jenkins
Abe Diaz
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
IndicThreads
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
An Introduction To Jenkins
An Introduction To Jenkins
Knoldus Inc.
 
JUC Europe 2015: Scaling Your Jenkins Master with Docker
JUC Europe 2015: Scaling Your Jenkins Master with Docker
CloudBees
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop pipelines - Eric Long
ericlongtx
 
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Steffen Gebert
 
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
Docker, Inc.
 
Pipeline as Code Continuous Delivery with Jenkins Kubernetes and Terraform 1s...
Pipeline as Code Continuous Delivery with Jenkins Kubernetes and Terraform 1s...
naveencwana55
 
Jenkins Pipelines
Jenkins Pipelines
Steffen Gebert
 

More Related Content

What's hot (20)

Jenkins, pipeline and docker
Jenkins, pipeline and docker
AgileDenver
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
Steffen Gebert
 
CI and CD with Jenkins
CI and CD with Jenkins
Martin Málek
 
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
CloudBees
 
Jenkins & IaC
Jenkins & IaC
HungWei Chiu
 
Yale Jenkins Show and Tell
Yale Jenkins Show and Tell
E. Camden Fisher
 
Continuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins Workflow
Udaypal Aarkoti
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
Francesco Bruni
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
Andy Pemberton
 
Jenkins Scriptler in 90mins
Jenkins Scriptler in 90mins
Larry Cai
 
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
Simon McCartney
 
Introduction to jenkins
Introduction to jenkins
Abe Diaz
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
IndicThreads
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
An Introduction To Jenkins
An Introduction To Jenkins
Knoldus Inc.
 
JUC Europe 2015: Scaling Your Jenkins Master with Docker
JUC Europe 2015: Scaling Your Jenkins Master with Docker
CloudBees
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop pipelines - Eric Long
ericlongtx
 
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Steffen Gebert
 
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
Docker, Inc.
 
Jenkins, pipeline and docker
Jenkins, pipeline and docker
AgileDenver
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
Steffen Gebert
 
CI and CD with Jenkins
CI and CD with Jenkins
Martin Málek
 
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
CloudBees
 
Yale Jenkins Show and Tell
Yale Jenkins Show and Tell
E. Camden Fisher
 
Continuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins Workflow
Udaypal Aarkoti
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
Francesco Bruni
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
Andy Pemberton
 
Jenkins Scriptler in 90mins
Jenkins Scriptler in 90mins
Larry Cai
 
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
CI/CD Pipeline to Deploy and Maintain an OpenStack IaaS Cloud
Simon McCartney
 
Introduction to jenkins
Introduction to jenkins
Abe Diaz
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
IndicThreads
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
An Introduction To Jenkins
An Introduction To Jenkins
Knoldus Inc.
 
JUC Europe 2015: Scaling Your Jenkins Master with Docker
JUC Europe 2015: Scaling Your Jenkins Master with Docker
CloudBees
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop pipelines - Eric Long
ericlongtx
 
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Steffen Gebert
 
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
Docker, Inc.
 

Similar to Continuous Integration With Jenkins Docker SQL Server (20)

Pipeline as Code Continuous Delivery with Jenkins Kubernetes and Terraform 1s...
Pipeline as Code Continuous Delivery with Jenkins Kubernetes and Terraform 1s...
naveencwana55
 
Jenkins Pipelines
Jenkins Pipelines
Steffen Gebert
 
Continuous Integration and Deployment with Jenkins for PCF
Continuous Integration and Deployment with Jenkins for PCF
Altoros
 
Continuous Integration and Deployment with Jenkins for PCF
Continuous Integration and Deployment with Jenkins for PCF
VMware Tanzu
 
Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2
Michal Ziarnik
 
DevOps-CI_CD_JAVA_JAVA______Jenkins.pptx
DevOps-CI_CD_JAVA_JAVA______Jenkins.pptx
ajaysahu931430
 
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Andy Pemberton
 
CICD with Jenkins
CICD with Jenkins
MoogleLabs default
 
Continuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and Deployit
XebiaLabs
 
Building and Deploying a Static Application using Jenkins and Docker in AWS
Building and Deploying a Static Application using Jenkins and Docker in AWS
ijtsrd
 
Jenkins vs. AWS CodePipeline
Jenkins vs. AWS CodePipeline
Steffen Gebert
 
Next generation pipelines
Next generation pipelines
Alex Landa
 
Kubernetes + Jenkins X: a Cloud Native Approach
Kubernetes + Jenkins X: a Cloud Native Approach
Thessaloniki Software Testing and QA meetup
 
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...
CloudBees
 
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Burr Sutter
 
Three amigos: Bitbucket + Jenkins + Docker
Three amigos: Bitbucket + Jenkins + Docker
Daniel Gordillo
 
Software Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery Approach
Giovanni Toraldo
 
Jenkins x azure
Jenkins x azure
Kyohei Moriyama
 
Continous delivery devoops Session no 26_new.pptx
Continous delivery devoops Session no 26_new.pptx
projectsasd125
 
Implementing CI CD UiPath Using Jenkins Plugin
Implementing CI CD UiPath Using Jenkins Plugin
Satish Prasad
 
Pipeline as Code Continuous Delivery with Jenkins Kubernetes and Terraform 1s...
Pipeline as Code Continuous Delivery with Jenkins Kubernetes and Terraform 1s...
naveencwana55
 
Continuous Integration and Deployment with Jenkins for PCF
Continuous Integration and Deployment with Jenkins for PCF
Altoros
 
Continuous Integration and Deployment with Jenkins for PCF
Continuous Integration and Deployment with Jenkins for PCF
VMware Tanzu
 
Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2
Michal Ziarnik
 
DevOps-CI_CD_JAVA_JAVA______Jenkins.pptx
DevOps-CI_CD_JAVA_JAVA______Jenkins.pptx
ajaysahu931430
 
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Andy Pemberton
 
Continuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and Deployit
XebiaLabs
 
Building and Deploying a Static Application using Jenkins and Docker in AWS
Building and Deploying a Static Application using Jenkins and Docker in AWS
ijtsrd
 
Jenkins vs. AWS CodePipeline
Jenkins vs. AWS CodePipeline
Steffen Gebert
 
Next generation pipelines
Next generation pipelines
Alex Landa
 
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...
CloudBees
 
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Burr Sutter
 
Three amigos: Bitbucket + Jenkins + Docker
Three amigos: Bitbucket + Jenkins + Docker
Daniel Gordillo
 
Software Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery Approach
Giovanni Toraldo
 
Continous delivery devoops Session no 26_new.pptx
Continous delivery devoops Session no 26_new.pptx
projectsasd125
 
Implementing CI CD UiPath Using Jenkins Plugin
Implementing CI CD UiPath Using Jenkins Plugin
Satish Prasad
 
Ad

More from Chris Adkin (17)

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

Recently uploaded (20)

Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Safe Software
 
Artificial Intelligence Workloads and Data Center Management
Artificial Intelligence Workloads and Data Center Management
SandeepKS52
 
Streamlining CI/CD with FME Flow: A Practical Guide
Streamlining CI/CD with FME Flow: A Practical Guide
Safe Software
 
Code and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage Overlook
Applitools
 
UPDASP a project coordination unit ......
UPDASP a project coordination unit ......
withrj1
 
Best MLM Compensation Plans for Network Marketing Success in 2025
Best MLM Compensation Plans for Network Marketing Success in 2025
LETSCMS Pvt. Ltd.
 
HYBRIDIZATION OF ALKANES AND ALKENES ...
HYBRIDIZATION OF ALKANES AND ALKENES ...
karishmaduhijod1
 
Y - Recursion The Hard Way GopherCon EU 2025
Y - Recursion The Hard Way GopherCon EU 2025
Eleanor McHugh
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Puppy jhon
 
GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?
felipeceotto
 
Open Source Software Development Methods
Open Source Software Development Methods
VICTOR MAESTRE RAMIREZ
 
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
BradBedford3
 
Reimagining Software Development and DevOps with Agentic AI
Reimagining Software Development and DevOps with Agentic AI
Maxim Salnikov
 
ElectraSuite_Prsentation(online voting system).pptx
ElectraSuite_Prsentation(online voting system).pptx
mrsinankhan01
 
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
Maharshi Mallela
 
Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)
VICTOR MAESTRE RAMIREZ
 
Decipher SEO Solutions for your startup needs.
Decipher SEO Solutions for your startup needs.
mathai2
 
Key Challenges in Troubleshooting Customer On-Premise Applications
Key Challenges in Troubleshooting Customer On-Premise Applications
Tier1 app
 
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Technologies
 
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Safe Software
 
Artificial Intelligence Workloads and Data Center Management
Artificial Intelligence Workloads and Data Center Management
SandeepKS52
 
Streamlining CI/CD with FME Flow: A Practical Guide
Streamlining CI/CD with FME Flow: A Practical Guide
Safe Software
 
Code and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage Overlook
Applitools
 
UPDASP a project coordination unit ......
UPDASP a project coordination unit ......
withrj1
 
Best MLM Compensation Plans for Network Marketing Success in 2025
Best MLM Compensation Plans for Network Marketing Success in 2025
LETSCMS Pvt. Ltd.
 
HYBRIDIZATION OF ALKANES AND ALKENES ...
HYBRIDIZATION OF ALKANES AND ALKENES ...
karishmaduhijod1
 
Y - Recursion The Hard Way GopherCon EU 2025
Y - Recursion The Hard Way GopherCon EU 2025
Eleanor McHugh
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Puppy jhon
 
GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?
felipeceotto
 
Open Source Software Development Methods
Open Source Software Development Methods
VICTOR MAESTRE RAMIREZ
 
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...
BradBedford3
 
Reimagining Software Development and DevOps with Agentic AI
Reimagining Software Development and DevOps with Agentic AI
Maxim Salnikov
 
ElectraSuite_Prsentation(online voting system).pptx
ElectraSuite_Prsentation(online voting system).pptx
mrsinankhan01
 
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
Maharshi Mallela
 
Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)
VICTOR MAESTRE RAMIREZ
 
Decipher SEO Solutions for your startup needs.
Decipher SEO Solutions for your startup needs.
mathai2
 
Key Challenges in Troubleshooting Customer On-Premise Applications
Key Challenges in Troubleshooting Customer On-Premise Applications
Tier1 app
 
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Technologies
 

Continuous Integration With Jenkins Docker SQL Server

  • 2. Build Pipeline 101 2. Build code into a deployable artefact 1. Check code out of source code control 3. Deploy code to test target 4. Run Tests  Apache Ant  Apache Maven  Gradle  Microsoft msbuild  Git  GitHub  Bitbucket  Team Foundation Server  Containers  Web servers  Databases  Public cloud PaaS  JUnit  Selenium  Mocha  Pester
  • 3. Build Pipeline As Code !!! 2. Build code into a deployable artefact 1. Check code out of source code control 3. Deploy code to test target 4. Run Tests  Jenkins  Groovy DSL (DSL = Domain specific language)  Jenkins script  Jenkins declarative pipeline  TFS / VSTS  Pipeline as YAML in VSTS preview  Coming to TFS sometime next year
  • 4. The ‘New’ Build Pipeline 2. Build code into a deployable artefact 1. Check code out of source code control 5. Deploy container image to a registry 4. Run Tests 3. Deploy code to test target
  • 5. Builds Can Be Event Triggered 1. Checkout code 2. Build artefact 3. Deploy to target 4. Run Tests Git/GitHub webhooks Visual studio online project service hooks Wouldn’t it be nice if we could have event driven builds and spin-up and then tare down the deployment target ?
  • 6. Containers To The Rescue !!!  We can fully container-ise the build environment  Scale-out the build infrastructure elastically using containers  Spin-up “Side car” containers as deployment targets  The “Builder pattern”
  • 7. The ‘Builder’ Pattern Spin-up a container to ‘Build’ the artefact here Deploy artefact to ‘Run’ container here Rationale: keep the size of the ‘Run’ container image as small as possible by not including the build tool chain
  • 8. Build Engines – There Are Lots To Choose From !!!  Jenkins:  Great open-source plugin support  Free  Light weight  Can be fully container-ised and scaled out with containers  Strong build-pipeline-as-code support  Multi-branch build pipelines
  • 9. Jenkins Pipeline As Code: The Two Flavours Scripted Pipeline Syntax node { stage('Example') { try { sh 'exit 1' } catch (exc) { echo ‘Failure, sound the alarm!' throw } } } Declarative Pipeline syntax pipeline { agent any stages { stage('Example') { steps { echo 'Hello World' } } } post { always { echo 'I will always say Hello again!' } } } https://jenkins.io/doc/book/pipeline/syntax/
  • 10. Store Your Pipeline Alongside Your Code Your pipeline code goes in here, this is for multi-branch pipelines
  • 11. “Syntactic sugar” For Working With Containers node('docker') { docker.withServer('tcp://docker.beedemo.net:2376', 'docker-beedemo-creds') { stage('Build Docker Image’) { def image = docker.build "cloudbees/mobile-deposit-api:${buildVersion}” } stage('Publish Docker Image’) { docker.withRegistry('https://registry.beedemo.net/', 'docker-registry-login') { image.push() } } stage('Deploy Docker Image’) { def container = image.run('--name mobile-deposit-api -p 8080:8080') } } }
  • 13. Demonstration: A Simple Web hook sqlproj DACPAC 1. Open visual studio project, make a change and perform a commit 2. Check code out of git 3. Build DACPAC from visual studio project 4. Deploy code to SQL Server GitHub repo: https://github.com/chrisadkin/SsdtDevOpsDemo, Blog Post
  • 14. Demonstration: A Multi-branch Build Pipeline Master HotFix Feature Jenkins creates a pipeline for each branch created from the master GitHub repo: https://github.com/chrisadkin/SelfBuildPipeline, Blog Post
  • 15. Demonstration: Using A Jenkins Build Slave Jenkins Build Master ( orchestrate build here ) Jenkins Build Slave ( deploy to container here ) GitHub repo: https://github.com/chrisadkin/SelfBuildPipelineDV, Blog Post
  • 16. Demonstration: Image Layering Base Image Intermediate images Final Image
  • 17. Pro Tip #1 Constructing Dockerfiles Put slow and time consuming operations as close to the top of the file as possible Put fast operations toward the bottom of the Dockerfile
  • 18. Pro Tip #2 Use of FROM Clauses In Dockerfiles The Dockerfile should only contain 1 FROM clause
  • 19. Pro Tip #3 Use Timeout Wrappers timeout(time:2, unit:'MINUTES') { bat "docker run -d -e ACCEPT_EULA=Y -e SA_PASSWORD=P@ssword1 --name SQLLinuxmaster -d -i -p 15565:1433 microsoft/mssql-server-linux" } My samples do not use this feature, but you may wish to consider this for pipelines used in actual production
  • 20. Demonstration: A Fully Containerised Build Environment Jenkins Master SQL Server “Side car” Deployment target GitHub repo: https://github.com/chrisadkin/SsdtJenkinsCiInDocker, Blog Post
  • 21. Demonstration: Adding tSQLt Unit Testing To The Pipeline sqlproj DACPAC 1. Open visual studio project, make a change and perform a commit 2. Check code out of git 3. Build DACPAC from visual studio project 4. Deploy code to SQL Server GitHub repo: https://github.com/chrisadkin/SelfBuildPipelineDV_tSQLt, Blog post coming soon . . . 5. Run tSQLt tests
  • 22. Want To Get More Adventurous ?  Scale out your build platform with build slaves as containers  Deploy Jenkins to Kubernetes  Build shared groovy script libraries to share code across pipelines  Invoke builds from the REST API
  • 23. Some Final Words  Linux images tend to be smaller, faster and more stable than their windows counterparts:  windowsservercore 10.4 GB  ubuntu 123 MB  Alpine 3.97 MB ( .Net core 2.1 will run on this)  Docker community edition can be temperamental  People including myself have had difficulty getting the docker SQL Server lab to work  Jenkins is open source, things can break from one release to the next !!!
  • 24. Further Reading  Top 10 Jenkins best practices from CloudBees  Jenkins Pipeline as code from Jenkins.io, includes:  Demos  Downloadable examples  Articles  Blogposts  Recordings
  • 25. . . . any questions