a pragmatic approach to continuous delivery
DESCRIPTION
Here are the slides from my presentation at jDays 2012.TRANSCRIPT
![Page 1: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/1.jpg)
A Pragmatic Approach to Continuous DeliveryIvar Grimstad
jDays 2012 Ivar Grimstad1
![Page 2: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/2.jpg)
2012-12-03 e.g. name of the presenter2
![Page 3: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/3.jpg)
@ivar_grimstad
jDays 2012 Ivar Grimstad3
![Page 4: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/4.jpg)
• JUnit
• Ant
• Continuous Integration
• Maven
• Continuous Delivery
A Little History
jDays 2012 Ivar Grimstad4
![Page 5: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/5.jpg)
Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan
Agile Manifesto
jDays 2012 Ivar Grimstad5
http://www.agilemanifesto.org/
![Page 6: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/6.jpg)
Our highest priority is to satisfy the customer
through early and continuous delivery
of valuable software.
Welcome changing requirements, even late in
development. Agile processes harness change for
the customer's competitive advantage.
Deliver working software frequently, from a
couple of weeks to a couple of months, with a
preference to the shorter timescale.
Business people and developers must work
together daily throughout the project.
Build projects around motivated individuals.
Give them the environment and support they need,
and trust them to get the job done.
The most efficient and effective method of
conveying information to and within a development
team is face-to-face conversation.
Working software is the primary measure of progress.
Agile processes promote sustainable development.
The sponsors, developers, and users should be able
to maintain a constant pace indefinitely.
Continuous attention to technical excellence
and good design enhances agility.
Simplicity--the art of maximizing the amount
of work not done--is essential.
The best architectures, requirements, and designs
emerge from self-organizing teams.
At regular intervals, the team reflects on how
to become more effective, then tunes and adjusts
its behavior accordingly.
Principles behind the Agile Manifesto
jDays 2012 Ivar Grimstad6
http://www.agilemanifesto.org/
![Page 7: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/7.jpg)
Our highest priority is to satisfy the customer
through early and continuous delivery of valuable
software.
Principles behind the Agile Manifesto
jDays 2012 Ivar Grimstad7
http://www.agilemanifesto.org/
Welcome changing requirements, even late in
development. Agile processes harness change for
the customer's competitive advantage.
Deliver working software frequently, from a
couple of weeks to a couple of months, with a
preference to the shorter timescale.
Business people and developers must work
together daily throughout the project.
Build projects around motivated individuals.
Give them the environment and support they need,
and trust them to get the job done.
The most efficient and effective method of
conveying information to and within a development
team is face-to-face conversation.
Working software is the primary measure of progress.
Agile processes promote sustainable development.
The sponsors, developers, and users should be able
to maintain a constant pace indefinitely.
Continuous attention to technical excellence
and good design enhances agility.
Simplicity--the art of maximizing the amount
![Page 8: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/8.jpg)
A Pragmatic Approach to Continuous Delivery
Motivation
jDays 2012 Ivar Grimstad8
![Page 9: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/9.jpg)
• Build Binaries Once
• One Process Deploy
• Test Deployments
• Flow
• Fail -> Stop the Line
The Deployment Pipeline
jDays 2012 Ivar Grimstad9
![Page 10: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/10.jpg)
• Commit
• Analysis
• Deploy
• Test
• Deliver
Remember that this is a pragmatic approach
Deployment Pipeline Stages
jDays 2012 Ivar Grimstad10
![Page 11: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/11.jpg)
• Compile
• Test
• Create binaries for later use
The Commit Stage - Steps
jDays 2012 Ivar Grimstad11
![Page 12: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/12.jpg)
The Commit Stage - Example
jDays 2012 Ivar Grimstad12
![Page 13: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/13.jpg)
• Static Analysis
The Analysis Stage - Steps
jDays 2012 Ivar Grimstad13
![Page 14: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/14.jpg)
• Test Coverage
• Duplications
• Complexity
• Coupling
• Rule Compliance
• Code Style
The Analysis Stage - Metrics
jDays 2012 Ivar Grimstad14
![Page 15: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/15.jpg)
Sonar
jDays 2012 Ivar Grimstad15
![Page 16: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/16.jpg)
The Analysis Stage - Example
jDays 2012 Ivar Grimstad16
![Page 17: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/17.jpg)
• Copy Artifact from Commit Stage
• Deploy to Test Environment
The Deploy Stage - Steps
jDays 2012 Ivar Grimstad17
![Page 18: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/18.jpg)
The Deploy Stage - Example
jDays 2012 Ivar Grimstad18
![Page 19: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/19.jpg)
• Choose a subset of tests to run
• Run tests most likely to fail first
The Test Stage - Steps
jDays 2012 Ivar Grimstad19
![Page 20: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/20.jpg)
The Test Stage - Example
jDays 2012 Ivar Grimstad20
![Page 21: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/21.jpg)
The Test Stage - Example
jDays 2012 Ivar Grimstad21
![Page 22: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/22.jpg)
• Copy Artifact from Commit Stage
• Deliver according to agreement
The Deliver Stage - Steps
jDays 2012 Ivar Grimstad22
![Page 23: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/23.jpg)
The Deliver Stage - Example
jDays 2012 Ivar Grimstad23
![Page 24: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/24.jpg)
Jenkins Build Pipeline Plugin
jDays 2012 Ivar Grimstad24
![Page 25: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/25.jpg)
Jenkins Build Pipeline Plugin
jDays 2012 Ivar Grimstad25
![Page 26: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/26.jpg)
• Use Maven Release Plugin
– mvn release:branch or mvn release:prepare
– mvn release:perform
• Jenkins Fingerprint Functionality
What about Versioning?
jDays 2012 Ivar Grimstad26
![Page 27: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/27.jpg)
Do not underestimate JavaDoc!
What about Documentation?
jDays 2012 Ivar Grimstad27
![Page 28: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/28.jpg)
• Blue/Green Deployments
• Canary Releasing
• Feature Toggles
• Branch by Abstraction
Designing for Continuous Delivery
jDays 2012 Ivar Grimstad28
![Page 29: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/29.jpg)
• Manual Deployment
• Deployment to production-like environment after
development is complete
• Manual configuration of production environment
• Excessive Branching
Antipatterns
jDays 2012 Ivar Grimstad29
![Page 30: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/30.jpg)
• Every change should trigger the feedback process
• Fast Feedback
• Act on the Feedback
To Sum Up
jDays 2012 Ivar Grimstad30
![Page 31: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/31.jpg)
• Jenkins
– Build Pipeline Plugin
– Copy Artifact Plugin
• Sonar
• Maven
– Maven Release Plugin
– Maven Javadoc Plugin
– Maven Glassfish Plugin (similar for all app servers)
Tools
jDays 2012 Ivar Grimstad31
![Page 32: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/32.jpg)
• Define your pipeline steps
• Set up the jobs
• Start configuring
• Evolve your pipeline
Where to start?
jDays 2012 Ivar Grimstad32
![Page 33: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/33.jpg)
• Architecting for Continuous Delivery
Axel Fontaine
Tuesday 14:40
• Building a Continuous Deployment Pipeline with Maven
Alan Parkinson
Wednesday 13:30
More at jDays
jDays 2012 Ivar Grimstad33
![Page 34: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/34.jpg)
It is not that hard!
Remember…
jDays 2012 Ivar Grimstad34
![Page 35: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/35.jpg)
You’re probably doing it already!
…and
jDays 2012 Ivar Grimstad35
![Page 36: A pragmatic approach to continuous delivery](https://reader036.vdocuments.site/reader036/viewer/2022062419/559868ca1a28abae738b46a5/html5/thumbnails/36.jpg)
@ivar_grimstad
http://www.agilejava.eu
jDays 2012 Ivar Grimstad36