24
Continuous Delivery The Continuous Delivery toolstack for embedded Java by Leif Sørensen, Partner at Praqma

The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

Embed Size (px)

DESCRIPTION

Oplægget blev holdt ved InfinIT-arrangementet "Temadag: Java for real-time and embedded systems", afholdt hhv. 12. og 13. september 2013. Læs mere om arrangementet her: http://infinit.dk/dk/arrangementer/tidligere_arrangementer/temadag_java_for_real-time_and_embedded_systems.htm

Citation preview

Page 1: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

Continuous Delivery

The Continuous Delivery toolstack for embedded Java

by Leif Sørensen, Partner at Praqma

Page 2: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

Continuous Delivery

PraqmaContinuous Delivery Experts

We automate softwaredevelopment processes and verification techniques

We do sponsored Open Source development.

Our focus is strong on Open Source tools especially Jenkins CI

Regional serviceService partneragreements

Page 3: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

Continuous Delivery

Continuous Delivery Defies Phases

Software development is iterative by nature. Traditionally each iteration is seen as divided into phases

Development Integration Testing Deployment Release

The workload in each phase is unpredictable...and so becomes the release date

The business stakeholders must be able to decide the release date

Development+Integration+Testing+Deployment+

Release

Development+Integration+Testing+Deployment+

Release

Development+Integration+Testing+Deployment+

Release

Development+Integration+Testing+Deployment+

Release

Development+Integration+Testing+Deployment+

Release

Every commit is a potential release candidate

Page 4: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

Continuous Delivery

Agile manifesto

Page 5: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

Continuous Delivery

Continuous Delivery A Staged Approach

CommitRejected

Released

Pre-test

StaticAnalysis

Passed

Failed

Deploy &Test

Passed

Failed

Failed

Release &Deploy

Passed

Failed

Page 6: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

Continuous Delivery

Signs ofContinuous Delivery Maturity

“Early Branching”

Branches used for releases

Merges are rare

Unit Test

Code Coverage

Verification before commit

run in developer'sWorkspace

Common nightly build

Build status isnotified tocommitter

“Late branching”

Branches usedfor work isolation

Merges are common

Metrics ontechnical debt &

compliance

Mock-up's & proxies

Ci serverbuilds on commit

Artifacts are managed

Latest build status Is available to

all stakeholders

Pre-tested Commits

Integration branchis pristine

Peer-reviews

AutomatedFunctional

Test

No build scripts-only configurations

Dependenciesare managed

Trend reports

Build status can be subscribed to

(pull vs push)

All commits are tied to tasks

Individual history rewrites

In DVCS

Test Data

Test in target

Distributed builds

Staged buildsequence

Monitors in work areas show

real-time status

Release notes & traceability

analysisare generatedautomatically

AutomatedAcceptance

Test

Build from VM

CI serverorchestrate VMs

Build reports and statistics are

shared withcustomer and

public

Visibility

SCM

Test + QA

Build

Novice Expert

Page 7: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

Continuous Delivery

Cobertura● A code coverage utility for Java.

Javadoc

Checkstyle

● Junit● A programmer-oriented testing framework for Java.

Tools

Page 8: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

Continuous Delivery

Jenkins CI - What it does

Jenkins CI make the state of the software

visible

Page 9: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

Continuous Delivery

Build pipelines

Page 10: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

Continuous Delivery

Cobertura Code Coverage

Page 11: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

Continuous Delivery

Cobertura Code Coverage

Page 12: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

Continuous Delivery

Checkstyle, Open Tasks

Page 13: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

1

Praqmatic Software Development

Continuous Delivery

The Continuous Delivery toolstack for embedded Java

by Leif Sørensen, Partner at Praqma

Page 14: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

2

Praqmatic Software Development

Continuous Delivery

PraqmaContinuous Delivery Experts

We automate softwaredevelopment processes and verification techniques

We do sponsored Open Source development.

Our focus is strong on Open Source tools especially Jenkins CI

Regional serviceService partneragreements

● Continuous delivery experts, experienced in working in regulated environments such at FDA, Solvency II, MISRA and ISO

● We help software development teams setup their software development processes, continuous integration and continuous delivery strategies.

● Open source community karma

● Offer SLA to our customers, that enables safe use of OSS

● Contribute by proxy

● Hvem er vi/jeg?

● Hvem er I?

Page 15: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

3

Praqmatic Software Development

Continuous Delivery

Continuous Delivery Defies Phases

Software development is iterative by nature. Traditionally each iteration is seen as divided into phases

Development Integration Testing Deployment Release

The workload in each phase is unpredictable...and so becomes the release date

The business stakeholders must be able to decide the release date

Development+Integration+Testing+Deployment+

Release

Development+Integration+Testing+Deployment+

Release

Development+Integration+Testing+Deployment+

Release

Development+Integration+Testing+Deployment+

Release

Development+Integration+Testing+Deployment+

Release

Every commit is a potential release candidate

● Software development is iterative by nature, each release is followed by another, and each release tend to be regarded as a separate cycle

● Traditionally the SW process is perceived as having phases, which all -except the development itself - deals with consolidating the development effort.

● The consolidating phases are all notoriously unpredictable.

● The release data can not be planned

● The solution is to to automate all consolidation and verification steps and execute them upon every single commit

● The most important ingredients are an unquenchable urge to automate everything and a well greased build environment

● The phases – as we know them from traditional SW development – has got to be eliminated

● CD defies phases

Page 16: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

4

Praqmatic Software Development

Continuous Delivery

Agile manifesto

2 important points from agile manifesto

Page 17: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

5

Praqmatic Software Development

Continuous Delivery

Continuous Delivery A Staged Approach

CommitRejected

Released

Pre-test

StaticAnalysis

Passed

Failed

Deploy &Test

Passed

Failed

Failed

Release &Deploy

Passed

Failed

Imagine that you should draw a state-transition diagram of the process that should validate a release candidate from the point where it's committed to the VCS and through the verifications that would finally validate it.

It Could probably look something like this.

Point is:

● It's a staged model

● Each stage consist of an action AND a decision

● If this shall be automated then BOTH the action and the decision must be automated

Jenkins Can do this!

Page 18: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

6

Praqmatic Software Development

Continuous Delivery

Signs ofContinuous Delivery Maturity

“Early Branching”

Branches used for releases

Merges are rare

Unit Test

Code Coverage

Verification before commit

run in developer'sWorkspace

Common nightly build

Build status isnotified tocommitter

“Late branching”

Branches usedfor work isolation

Merges are common

Metrics ontechnical debt &

compliance

Mock-up's & proxies

Ci serverbuilds on commit

Artifacts are managed

Latest build status Is available to

all stakeholders

Pre-tested Commits

Integration branchis pristine

Peer-reviews

AutomatedFunctional

Test

No build scripts-only configurations

Dependenciesare managed

Trend reports

Build status can be subscribed to

(pull vs push)

All commits are tied to tasks

Individual history rewrites

In DVCS

Test Data

Test in target

Distributed builds

Staged buildsequence

Monitors in work areas show

real-time status

Release notes & traceability

analysisare generatedautomatically

AutomatedAcceptance

Test

Build from VM

CI serverorchestrate VMs

Build reports and statistics are

shared withcustomer and

public

Visibility

SCM

Test + QA

Build

Novice Expert

Page 19: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

7

Praqmatic Software Development

Continuous Delivery

Cobertura● A code coverage utility for Java.

Javadoc

Checkstyle

● Junit● A programmer-oriented testing framework for Java.

Tools

Page 20: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

8

Praqmatic Software Development

Continuous Delivery

Jenkins CI - What it does

Jenkins CI make the state of the software

visible

Page 21: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

9

Praqmatic Software Development

Continuous Delivery

Build pipelines

Page 22: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

10

Praqmatic Software Development

Continuous Delivery

Cobertura Code Coverage

Page 23: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

11

Praqmatic Software Development

Continuous Delivery

Cobertura Code Coverage

Page 24: The Continuous Delivery toolstack for embedded Java af Leif Sørensen, Praqma

12

Praqmatic Software Development

Continuous Delivery

Checkstyle, Open Tasks