Introduction to Continuous Integration

Bill Havanki
Bill HavankiSoftware Engineer, Author at Segment
Bill	
  Havanki	
  |	
  Solu.ons	
  Architect	
  
Charm	
  City	
  Linux	
  |	
  March	
  2014
Introduc.on	
  to	
  Con.nuous	
  
Integra.on
1Monday, March 24, 14
2
About	
  Bill
• Jersey	
  Shore	
  na.ve
• Rutgers,	
  NC	
  State	
  grad
• Java	
  development	
  since	
  ’96
• DoD	
  contractor	
  for	
  15	
  years
• Clouderan	
  for	
  6	
  months
2Monday, March 24, 14
Agenda
• Part	
  I:	
  What	
  is	
  con.nuous	
  integra.on	
  (CI)?
• Part	
  II:	
  How	
  does	
  CI	
  relate	
  to	
  other	
  things?
• Interlude:	
  About	
  “process”
• Part	
  III:	
  How	
  do	
  I	
  start	
  with	
  CI?
• Conclusion	
  and	
  QA	
  Time
3
3Monday, March 24, 14
Not	
  CSI
Part	
  I:	
  What	
  is	
  CI?
4
4Monday, March 24, 14
5
Boring	
  defini.on
Con.nuous	
  integra.on	
  (CI)	
  is	
  the	
  prac.ce,	
  in	
  
so[ware	
  engineering,	
  of	
  merging	
  all	
  developer	
  
working	
  copies	
  with	
  a	
  shared	
  mainline	
  several	
  .mes	
  
a	
  day.
-­‐	
  Wikipedia
5Monday, March 24, 14
Real	
  defini.on
Stop	
  digging	
  holes
6
CC	
  BY-­‐SA	
  2.0:	
  Chris	
  Wimbush
6Monday, March 24, 14
XP	
  Origins
Kent	
  Beck:	
  “turn	
  all	
  the	
  knobs	
  up	
  to	
  10”
Don’t	
  integrate	
  some.mes,	
  integrate	
  all	
  the	
  -me
7
CC	
  BY-­‐SA	
  2.0:	
  Rick	
  Kimpel
7Monday, March 24, 14
Benefits	
  of	
  CI
• integra.on	
  happens	
  before	
  it	
  gets	
  hairy
• no	
  more	
  “well,	
  it	
  builds	
  on	
  my	
  machine”
• code	
  stability
• springboard	
  for	
  increasing	
  quality
8
8Monday, March 24, 14
Costs	
  of	
  CI
• major	
  features	
  need	
  to	
  evolve,	
  not	
  just	
  drop
• steers	
  aden.on	
  toward	
  fixing	
  builds
• need	
  some	
  infrastructure
• build	
  needs	
  to	
  work	
  without	
  a	
  human	
  running	
  it
9
9Monday, March 24, 14
A	
  happy	
  family
Part	
  II:	
  CI	
  and	
  Other	
  Prac.ces
10
10Monday, March 24, 14
“ ”Without	
  some	
  sort	
  of	
  version	
  
control	
  system	
  in	
  place,	
  you	
  
can't	
  reasonably	
  call	
  yourself	
  
a	
  so;ware	
  engineer.
–	
  Jeff	
  Atwood
11
11Monday, March 24, 14
12
CI	
  +	
  version	
  control
• first,	
  you	
  should	
  be	
  using	
  it	
  anyway
• neutral,	
  available	
  home	
  for	
  code
• remembers	
  past	
  working	
  states	
  for	
  when	
  
integra.on	
  fails
• holds	
  your	
  branches	
  that	
  need	
  integra.ng
12Monday, March 24, 14
CI	
  +	
  unit	
  tes.ng
Unit	
  tests	
  indicate
whether	
  integra.on
has	
  succeeded
13
hdps://wiki.jenkins-­‐ci.org/display/JENKINS/JUnit+graph,	
  
retrieved	
  2014-­‐02-­‐21
13Monday, March 24, 14
CI	
  +	
  automated	
  builds
• tools	
  require	
  a	
  non-­‐manual	
  build	
  process
• builds	
  must	
  work	
  outside	
  developers’	
  specific	
  
environments
14
14Monday, March 24, 14
CI	
  +	
  con.nuous	
  delivery
F**k	
  it,	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  it
15
15Monday, March 24, 14
CI	
  +	
  con.nuous	
  delivery
CI	
  enables	
  you	
  to	
  move	
  toward	
  con.nuous	
  delivery
16
16Monday, March 24, 14
Subheading:	
  Calibri	
  20pt	
  approved	
  light	
  blue
Aside:	
  On	
  Processes
17
17Monday, March 24, 14
18
Lovely
18Monday, March 24, 14
Gorgeous
19
19Monday, March 24, 14
Oh	
  my
20
20Monday, March 24, 14
Zounds!
21
LICENTIOUSLY
REPUDIATE
THAT CACOPHONY
LICENTIOUSLY
REPUDIATE
THAT CACOPHONY
21Monday, March 24, 14
The	
  purpose	
  of	
  process
Good	
  so[ware	
  processes	
  help	
  you	
  do	
  beder	
  work.
They	
  serve	
  you,	
  you	
  do	
  not	
  serve	
  them.
22
22Monday, March 24, 14
Agile	
  Manifesto
Individuals	
  and	
  interac/ons	
  over	
  processes	
  and	
  tools
Working	
  so4ware	
  over	
  comprehensive	
  documenta.on
Customer	
  collabora/on	
  over	
  contract	
  nego.a.on
Responding	
  to	
  change	
  over	
  following	
  a	
  plan
agilemanifesto.org
23
23Monday, March 24, 14
Replacing	
  you	
  with	
  a	
  small	
  shell	
  script
Part	
  III:	
  Star.ng	
  up	
  CI
24
24Monday, March 24, 14
25
Step	
  Zero:	
  Use	
  version	
  control
Without	
  version	
  control	
  there	
  is	
  no	
  point
CC	
  BY	
  3.0,	
  Jason	
  Long
CC	
  BY-­‐SA	
  3.0,	
  Smile4ever
25Monday, March 24, 14
Step	
  One:	
  Fix	
  your	
  builds
• One	
  step,	
  like	
  make	
  or	
  mvn	
  package
• From	
  a	
  command	
  line
• In	
  a	
  neutral	
  and	
  well-­‐defined	
  environment
26
26Monday, March 24, 14
Step	
  Two:	
  Tool	
  up
A	
  script	
  under	
  cron	
  can	
  do	
  it
27
cd	
  /home/bill/project
git	
  pull
mvn	
  clean	
  package
if	
  ((	
  $?	
  !=	
  0	
  ));	
  then
	
  	
  	
  	
  echo	
  "Build	
  failed"	
  |	
  mail	
  -­‐s	
  "Build	
  failed"	
  
	
  	
  	
  	
  	
  	
  	
  	
  bill@our.com	
  alex@our.com
fi
27Monday, March 24, 14
Step	
  Two:	
  Tool	
  up
• Do	
  not	
  build	
  if	
  nothing	
  changed
• Trigger	
  on	
  commit	
  instead	
  of	
  using	
  cron
• Keep	
  build	
  logs	
  and	
  ar.facts
• Keep	
  history	
  of	
  stability
• Do	
  more	
  than	
  just	
  compile	
  ...	
  test,	
  analyze	
  ...
28
Then	
  you	
  get	
  fancier
28Monday, March 24, 14
Step	
  Two:	
  Tool	
  up
And	
  then	
  you	
  realize	
  you
could	
  use	
  a	
  robust	
  tool
29
CC	
  BY-­‐SA	
  3.0,	
  the	
  Jenkins	
  Project
(hdp://jenkins-­‐ci.org/)
29Monday, March 24, 14
OMG	
  DEMO	
  TIME
30
30Monday, March 24, 14
Step	
  Three:	
  Actually	
  integrate	
  con.nuously
This	
  is	
  the	
  hard	
  part.	
  Your	
  team	
  has	
  to	
  start	
  
commipng	
  to	
  the	
  mainline	
  more	
  frequently.
The	
  CI	
  tool	
  is	
  your	
  safety	
  net.
31
31Monday, March 24, 14
Step	
  Four:	
  More	
  stuff
• Add	
  unit	
  tests
• Add	
  sta.c	
  analysis	
  like	
  Findbugs
• Feed	
  quality	
  analyzers	
  like	
  Sonar
32
32Monday, March 24, 14
Step	
  Five:	
  Add	
  lava	
  lamps
33
hdp://www.devbridge.com/ar.cles/con.nous-­‐integra.on-­‐in-­‐net-­‐projects/,	
  
retrieved	
  2014-­‐02-­‐24
33Monday, March 24, 14
Wherein	
  we	
  conclude
Conclusion
34
34Monday, March 24, 14
35
CI	
  is	
  just	
  here	
  to	
  help
• catch	
  regressions	
  for	
  you
• check	
  on	
  merges	
  for	
  you
• generate	
  handy	
  reports	
  for	
  you
• reduce	
  your	
  stress	
  level
• move	
  you	
  to	
  the	
  next	
  level
35Monday, March 24, 14
For	
  more	
  informa.on
hdp://mar.nfowler.com/ar.cles/con.nuousIntegra.on.html
hdp://www.extremeprogramming.org/rules/integrateo[en.html
hdp://jenkins-­‐ci.org/
36
36Monday, March 24, 14
Thank	
  you
Bill	
  Havanki
bill@clouderagovt.com
havanki4j@gmail.com
37
37Monday, March 24, 14
38Monday, March 24, 14
1 of 38

Recommended

Docker Deployments by
Docker DeploymentsDocker Deployments
Docker DeploymentsDocker, Inc.
27.2K views14 slides
Open design at large scale by
Open design at large scaleOpen design at large scale
Open design at large scaleshykes
8.1K views14 slides
DevSecOps: Bringing security to the DevOps pipeline by
DevSecOps: Bringing security to the DevOps pipelineDevSecOps: Bringing security to the DevOps pipeline
DevSecOps: Bringing security to the DevOps pipelineAarno Aukia
216 views30 slides
Kubecon 2019 Recap by
Kubecon 2019 RecapKubecon 2019 Recap
Kubecon 2019 RecapAarno Aukia
260 views12 slides
Cloud Study Jam Exploring the Cloud by
Cloud Study Jam Exploring the CloudCloud Study Jam Exploring the Cloud
Cloud Study Jam Exploring the CloudProttay Karim
166 views24 slides
A Tour of Internal Accumulo Testing by
A Tour of Internal Accumulo TestingA Tour of Internal Accumulo Testing
A Tour of Internal Accumulo TestingBill Havanki
1.7K views27 slides

More Related Content

Viewers also liked

Ibm innovate ci for system z by
Ibm innovate ci for system zIbm innovate ci for system z
Ibm innovate ci for system zRosalind Radcliffe
1.9K views34 slides
A developer story by
A developer storyA developer story
A developer storyAlex Danvy
623 views18 slides
Is Orchestration the Next Big Thing in DevOps by
Is Orchestration the Next Big Thing in DevOpsIs Orchestration the Next Big Thing in DevOps
Is Orchestration the Next Big Thing in DevOpsNati Shalom
4.9K views30 slides
Orchestrating the Cloud by
Orchestrating the CloudOrchestrating the Cloud
Orchestrating the CloudAmazon Web Services
79.1K views169 slides
Running OpenStack in Production by
Running OpenStack in Production Running OpenStack in Production
Running OpenStack in Production Nati Shalom
3.7K views35 slides
Jenkins CI by
Jenkins CIJenkins CI
Jenkins CIhaochenglee
28.1K views63 slides

Viewers also liked(13)

A developer story by Alex Danvy
A developer storyA developer story
A developer story
Alex Danvy623 views
Is Orchestration the Next Big Thing in DevOps by Nati Shalom
Is Orchestration the Next Big Thing in DevOpsIs Orchestration the Next Big Thing in DevOps
Is Orchestration the Next Big Thing in DevOps
Nati Shalom4.9K views
Running OpenStack in Production by Nati Shalom
Running OpenStack in Production Running OpenStack in Production
Running OpenStack in Production
Nati Shalom3.7K views
Jenkins CI by haochenglee
Jenkins CIJenkins CI
Jenkins CI
haochenglee28.1K views
Jenkins - From Continuous Integration to Continuous Delivery by Virendra Bhalothia
Jenkins - From Continuous Integration to Continuous DeliveryJenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous Delivery
Virendra Bhalothia21.2K views
Ansible presentation by John Lynch
Ansible presentationAnsible presentation
Ansible presentation
John Lynch34.8K views
Orchestration and provisioning architecture for effective service management by Alan McSweeney
Orchestration and provisioning architecture for effective service managementOrchestration and provisioning architecture for effective service management
Orchestration and provisioning architecture for effective service management
Alan McSweeney12.3K views
Ansible - Swiss Army Knife Orchestration by bcoca
Ansible - Swiss Army Knife OrchestrationAnsible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife Orchestration
bcoca31.7K views
Ansible Introduction by Robert Reiz
Ansible Introduction Ansible Introduction
Ansible Introduction
Robert Reiz17.6K views
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline by Robert McDermott
Anatomy of a Continuous Integration and Delivery (CICD) PipelineAnatomy of a Continuous Integration and Delivery (CICD) Pipeline
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
Robert McDermott80.1K views
How Ansible Makes Automation Easy by Peter Sankauskas
How Ansible Makes Automation EasyHow Ansible Makes Automation Easy
How Ansible Makes Automation Easy
Peter Sankauskas12.4K views

Similar to Introduction to Continuous Integration

Ship code like a keptn by
Ship code like a keptnShip code like a keptn
Ship code like a keptnRob Jahn
432 views45 slides
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa... by
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Marcin Grzejszczak
2.5K views126 slides
WTF is a Microservice - Rafael Schloming, Datawire by
WTF is a Microservice - Rafael Schloming, DatawireWTF is a Microservice - Rafael Schloming, Datawire
WTF is a Microservice - Rafael Schloming, DatawireAmbassador Labs
2K views41 slides
GitOps , done Right by
GitOps , done RightGitOps , done Right
GitOps , done RightKris Buytaert
209 views38 slides
CI/CD with Github Actions by
CI/CD with Github ActionsCI/CD with Github Actions
CI/CD with Github ActionsMd. Minhazul Haque
405 views20 slides
Rising Above the Noise: Continuous Integration, Delivery and DevOps by
Rising Above the Noise: Continuous Integration, Delivery and DevOpsRising Above the Noise: Continuous Integration, Delivery and DevOps
Rising Above the Noise: Continuous Integration, Delivery and DevOpsIBM UrbanCode Products
1.3K views30 slides

Similar to Introduction to Continuous Integration(20)

Ship code like a keptn by Rob Jahn
Ship code like a keptnShip code like a keptn
Ship code like a keptn
Rob Jahn432 views
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa... by Marcin Grzejszczak
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Marcin Grzejszczak2.5K views
WTF is a Microservice - Rafael Schloming, Datawire by Ambassador Labs
WTF is a Microservice - Rafael Schloming, DatawireWTF is a Microservice - Rafael Schloming, Datawire
WTF is a Microservice - Rafael Schloming, Datawire
Ambassador Labs2K views
Rising Above the Noise: Continuous Integration, Delivery and DevOps by IBM UrbanCode Products
Rising Above the Noise: Continuous Integration, Delivery and DevOpsRising Above the Noise: Continuous Integration, Delivery and DevOps
Rising Above the Noise: Continuous Integration, Delivery and DevOps
Bringing CD to the DoD by Gene Gotimer
Bringing CD to the DoDBringing CD to the DoD
Bringing CD to the DoD
Gene Gotimer109 views
Docker in Production: How RightScale Delivers Cloud Applications by RightScale
Docker in Production: How RightScale Delivers Cloud ApplicationsDocker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud Applications
RightScale1.5K views
Characteristics And Features Of Tiny OS by Brenda Potter
Characteristics And Features Of Tiny OSCharacteristics And Features Of Tiny OS
Characteristics And Features Of Tiny OS
Brenda Potter3 views
Docker Meetup at Docker HQ: Docker Cloud by Docker, Inc.
Docker Meetup at Docker HQ: Docker CloudDocker Meetup at Docker HQ: Docker Cloud
Docker Meetup at Docker HQ: Docker Cloud
Docker, Inc.3.3K views
MA Microservices Meetup: Move fast and make things by Ambassador Labs
MA Microservices Meetup: Move fast and make thingsMA Microservices Meetup: Move fast and make things
MA Microservices Meetup: Move fast and make things
Ambassador Labs203 views
Continuous Delivery: 5 years later (Incontro DevOps 2018) by Giovanni Toraldo
Continuous Delivery: 5 years later (Incontro DevOps 2018)Continuous Delivery: 5 years later (Incontro DevOps 2018)
Continuous Delivery: 5 years later (Incontro DevOps 2018)
Giovanni Toraldo247 views
EPAM DevOps community meetup: Building CI/CD for microservice architecture by Katherine Golovinova
EPAM DevOps community meetup: Building CI/CD for microservice architectureEPAM DevOps community meetup: Building CI/CD for microservice architecture
EPAM DevOps community meetup: Building CI/CD for microservice architecture
Cloud-Native Fundamentals: Accelerating Development with Continuous Integration by VMware Tanzu
Cloud-Native Fundamentals: Accelerating Development with Continuous IntegrationCloud-Native Fundamentals: Accelerating Development with Continuous Integration
Cloud-Native Fundamentals: Accelerating Development with Continuous Integration
VMware Tanzu698 views
QCon SF 2017 - Microservices: Service-Oriented Development by Ambassador Labs
QCon SF 2017 - Microservices: Service-Oriented DevelopmentQCon SF 2017 - Microservices: Service-Oriented Development
QCon SF 2017 - Microservices: Service-Oriented Development
Ambassador Labs498 views
NYIT DSC/ Spring 2021 - Introduction to DevOps (CI/CD) by Hui (Henry) Chen
NYIT DSC/ Spring 2021 - Introduction to DevOps (CI/CD)NYIT DSC/ Spring 2021 - Introduction to DevOps (CI/CD)
NYIT DSC/ Spring 2021 - Introduction to DevOps (CI/CD)
Hui (Henry) Chen43 views
Alexander Kutsan: “C++ compilation boost” by LogeekNightUkraine
Alexander Kutsan: “C++ compilation boost” Alexander Kutsan: “C++ compilation boost”
Alexander Kutsan: “C++ compilation boost”
LogeekNightUkraine157 views
Integrating RightScale, Windows, and .NET for Fun and Profit - RightScale Com... by RightScale
Integrating RightScale, Windows, and .NET for Fun and Profit - RightScale Com...Integrating RightScale, Windows, and .NET for Fun and Profit - RightScale Com...
Integrating RightScale, Windows, and .NET for Fun and Profit - RightScale Com...
RightScale1.5K views
Journey Through Four Stages of Kubernetes Deployment Maturity by Altoros
Journey Through Four Stages of Kubernetes Deployment MaturityJourney Through Four Stages of Kubernetes Deployment Maturity
Journey Through Four Stages of Kubernetes Deployment Maturity
Altoros1.1K views

Recently uploaded

Report 2030 Digital Decade by
Report 2030 Digital DecadeReport 2030 Digital Decade
Report 2030 Digital DecadeMassimo Talia
14 views41 slides
Top 10 Strategic Technologies in 2024: AI and Automation by
Top 10 Strategic Technologies in 2024: AI and AutomationTop 10 Strategic Technologies in 2024: AI and Automation
Top 10 Strategic Technologies in 2024: AI and AutomationAutomationEdge Technologies
14 views14 slides
Java Platform Approach 1.0 - Picnic Meetup by
Java Platform Approach 1.0 - Picnic MeetupJava Platform Approach 1.0 - Picnic Meetup
Java Platform Approach 1.0 - Picnic MeetupRick Ossendrijver
25 views39 slides
The Research Portal of Catalonia: Growing more (information) & more (services) by
The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)CSUC - Consorci de Serveis Universitaris de Catalunya
73 views25 slides
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu... by
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...NUS-ISS
37 views54 slides

Recently uploaded(20)

Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu... by NUS-ISS
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...
NUS-ISS37 views
Transcript: The Details of Description Techniques tips and tangents on altern... by BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada130 views
Perth MeetUp November 2023 by Michael Price
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023
Michael Price15 views
[2023] Putting the R! in R&D.pdf by Eleanor McHugh
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf
Eleanor McHugh38 views
AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta15 views
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada121 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb12 views
Combining Orchestration and Choreography for a Clean Architecture by ThomasHeinrichs1
Combining Orchestration and Choreography for a Clean ArchitectureCombining Orchestration and Choreography for a Clean Architecture
Combining Orchestration and Choreography for a Clean Architecture
ThomasHeinrichs169 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman27 views
RADIUS-Omnichannel Interaction System by RADIUS
RADIUS-Omnichannel Interaction SystemRADIUS-Omnichannel Interaction System
RADIUS-Omnichannel Interaction System
RADIUS15 views
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze by NUS-ISS
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng TszeDigital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze
NUS-ISS19 views

Introduction to Continuous Integration

  • 1. Bill  Havanki  |  Solu.ons  Architect   Charm  City  Linux  |  March  2014 Introduc.on  to  Con.nuous   Integra.on 1Monday, March 24, 14
  • 2. 2 About  Bill • Jersey  Shore  na.ve • Rutgers,  NC  State  grad • Java  development  since  ’96 • DoD  contractor  for  15  years • Clouderan  for  6  months 2Monday, March 24, 14
  • 3. Agenda • Part  I:  What  is  con.nuous  integra.on  (CI)? • Part  II:  How  does  CI  relate  to  other  things? • Interlude:  About  “process” • Part  III:  How  do  I  start  with  CI? • Conclusion  and  QA  Time 3 3Monday, March 24, 14
  • 4. Not  CSI Part  I:  What  is  CI? 4 4Monday, March 24, 14
  • 5. 5 Boring  defini.on Con.nuous  integra.on  (CI)  is  the  prac.ce,  in   so[ware  engineering,  of  merging  all  developer   working  copies  with  a  shared  mainline  several  .mes   a  day. -­‐  Wikipedia 5Monday, March 24, 14
  • 6. Real  defini.on Stop  digging  holes 6 CC  BY-­‐SA  2.0:  Chris  Wimbush 6Monday, March 24, 14
  • 7. XP  Origins Kent  Beck:  “turn  all  the  knobs  up  to  10” Don’t  integrate  some.mes,  integrate  all  the  -me 7 CC  BY-­‐SA  2.0:  Rick  Kimpel 7Monday, March 24, 14
  • 8. Benefits  of  CI • integra.on  happens  before  it  gets  hairy • no  more  “well,  it  builds  on  my  machine” • code  stability • springboard  for  increasing  quality 8 8Monday, March 24, 14
  • 9. Costs  of  CI • major  features  need  to  evolve,  not  just  drop • steers  aden.on  toward  fixing  builds • need  some  infrastructure • build  needs  to  work  without  a  human  running  it 9 9Monday, March 24, 14
  • 10. A  happy  family Part  II:  CI  and  Other  Prac.ces 10 10Monday, March 24, 14
  • 11. “ ”Without  some  sort  of  version   control  system  in  place,  you   can't  reasonably  call  yourself   a  so;ware  engineer. –  Jeff  Atwood 11 11Monday, March 24, 14
  • 12. 12 CI  +  version  control • first,  you  should  be  using  it  anyway • neutral,  available  home  for  code • remembers  past  working  states  for  when   integra.on  fails • holds  your  branches  that  need  integra.ng 12Monday, March 24, 14
  • 13. CI  +  unit  tes.ng Unit  tests  indicate whether  integra.on has  succeeded 13 hdps://wiki.jenkins-­‐ci.org/display/JENKINS/JUnit+graph,   retrieved  2014-­‐02-­‐21 13Monday, March 24, 14
  • 14. CI  +  automated  builds • tools  require  a  non-­‐manual  build  process • builds  must  work  outside  developers’  specific   environments 14 14Monday, March 24, 14
  • 15. CI  +  con.nuous  delivery F**k  it,                    it 15 15Monday, March 24, 14
  • 16. CI  +  con.nuous  delivery CI  enables  you  to  move  toward  con.nuous  delivery 16 16Monday, March 24, 14
  • 17. Subheading:  Calibri  20pt  approved  light  blue Aside:  On  Processes 17 17Monday, March 24, 14
  • 22. The  purpose  of  process Good  so[ware  processes  help  you  do  beder  work. They  serve  you,  you  do  not  serve  them. 22 22Monday, March 24, 14
  • 23. Agile  Manifesto Individuals  and  interac/ons  over  processes  and  tools Working  so4ware  over  comprehensive  documenta.on Customer  collabora/on  over  contract  nego.a.on Responding  to  change  over  following  a  plan agilemanifesto.org 23 23Monday, March 24, 14
  • 24. Replacing  you  with  a  small  shell  script Part  III:  Star.ng  up  CI 24 24Monday, March 24, 14
  • 25. 25 Step  Zero:  Use  version  control Without  version  control  there  is  no  point CC  BY  3.0,  Jason  Long CC  BY-­‐SA  3.0,  Smile4ever 25Monday, March 24, 14
  • 26. Step  One:  Fix  your  builds • One  step,  like  make  or  mvn  package • From  a  command  line • In  a  neutral  and  well-­‐defined  environment 26 26Monday, March 24, 14
  • 27. Step  Two:  Tool  up A  script  under  cron  can  do  it 27 cd  /home/bill/project git  pull mvn  clean  package if  ((  $?  !=  0  ));  then        echo  "Build  failed"  |  mail  -­‐s  "Build  failed"                  bill@our.com  alex@our.com fi 27Monday, March 24, 14
  • 28. Step  Two:  Tool  up • Do  not  build  if  nothing  changed • Trigger  on  commit  instead  of  using  cron • Keep  build  logs  and  ar.facts • Keep  history  of  stability • Do  more  than  just  compile  ...  test,  analyze  ... 28 Then  you  get  fancier 28Monday, March 24, 14
  • 29. Step  Two:  Tool  up And  then  you  realize  you could  use  a  robust  tool 29 CC  BY-­‐SA  3.0,  the  Jenkins  Project (hdp://jenkins-­‐ci.org/) 29Monday, March 24, 14
  • 31. Step  Three:  Actually  integrate  con.nuously This  is  the  hard  part.  Your  team  has  to  start   commipng  to  the  mainline  more  frequently. The  CI  tool  is  your  safety  net. 31 31Monday, March 24, 14
  • 32. Step  Four:  More  stuff • Add  unit  tests • Add  sta.c  analysis  like  Findbugs • Feed  quality  analyzers  like  Sonar 32 32Monday, March 24, 14
  • 33. Step  Five:  Add  lava  lamps 33 hdp://www.devbridge.com/ar.cles/con.nous-­‐integra.on-­‐in-­‐net-­‐projects/,   retrieved  2014-­‐02-­‐24 33Monday, March 24, 14
  • 35. 35 CI  is  just  here  to  help • catch  regressions  for  you • check  on  merges  for  you • generate  handy  reports  for  you • reduce  your  stress  level • move  you  to  the  next  level 35Monday, March 24, 14