Transcript
Page 1: Continuous integration CloudParty 21 may 2014 - Milan

ROMA | LONDON| MILANO | PARIS | MADRID | REUS | BERLIN | BEOGRAD | ISTANBUL | SAN FRANCISCO | CIUDAD DE MÉXICO | SÃO PAULO | BOGOTÁ | MUMBAI

Un sistema di Continuous Integration fra progetti eterogenei

CloudParty 2014 - Deploy in Cloud - Milan 21 May

Simone Pasquini - @PasquiniSimone

Page 2: Continuous integration CloudParty 21 may 2014 - Milan

2

Big Bang Integration

● Integration is done close to a release● Problems/Incompatibilities between the codes become evident at release

time

Page 3: Continuous integration CloudParty 21 may 2014 - Milan

3

Continuous Integration

M.Fowler: Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible.

● Integrate frequently● Automated build● Detect integration errors quickly

Page 4: Continuous integration CloudParty 21 may 2014 - Milan

4

Continuous Integration

Maintain a Single Source Repository

● In general you should store in source control everything you need to build anything, but nothing that you actually build (artefact).

● One project one repo

Page 5: Continuous integration CloudParty 21 may 2014 - Milan

5

Continuous Integration

Automate the Build

● Anyone should be able to bring in a virgin machine, check the sources out of the repository, issue a single command, and have a running system on their machine

Page 6: Continuous integration CloudParty 21 may 2014 - Milan

6

Continuous Integration

Make Your Build Self-Testing

● A suite of automated tests that can check a large part of the code base for bugs. The tests need to be able to be kicked off from a simple command and to be self-checking.

Page 7: Continuous integration CloudParty 21 may 2014 - Milan

7

Continuous Integration

Everyone Commits To the Mainline Every Day

● Prerequisite for a developer committing to the mainline is that they can correctly build their code.

● Frequent commits encourage developers to break down their work into small chunks of a few hours each.

Page 8: Continuous integration CloudParty 21 may 2014 - Milan

8

Continuous Integration

Every Commit Should Build the Mainline on an Integration Machine

● Every time a commit against the repository finishes the server automatically checks out the sources onto the integration machine, initiates a build, and notifies the committer of the result of the build

Page 9: Continuous integration CloudParty 21 may 2014 - Milan

9

Continuous Integration

Keep the Build Fast

● The whole point of Continuous Integration is to provide rapid feedback.● Made a stage of pipeline with a sequential suite of

unit,integration,acceptance test

Page 10: Continuous integration CloudParty 21 may 2014 - Milan

10

Continuous Integration

Test in a Clone of the Production Environment

● As a result you want to set up your test environment to be as exact a mimic of your production environment as possible

Page 11: Continuous integration CloudParty 21 may 2014 - Milan

11

Continuous Integration

Everyone can see what's happening

● One of the most important things to communicate is the state of the mainline build

Page 12: Continuous integration CloudParty 21 may 2014 - Milan

12

Continuous Integration

Automate Deployment

● It's important to have scripts that will allow you to deploy the application into any environment easily.

Page 13: Continuous integration CloudParty 21 may 2014 - Milan

13

Continuous Integration

key points

● Build on each computer● All test suite green before push● Integration test between project every push● High priority for CI red build

Page 14: Continuous integration CloudParty 21 may 2014 - Milan

14

Continuous Integration

Build on each computer

Page 15: Continuous integration CloudParty 21 may 2014 - Milan

15

Continuous Integration

High priority for red build

Page 16: Continuous integration CloudParty 21 may 2014 - Milan

16

Continuous Integration

● Reduced risk during integration● It does make them dramatically easier to find and remove bug● Mindset● Methodology and not a tool

Page 17: Continuous integration CloudParty 21 may 2014 - Milan

17

Continuous Integration

Onebip Scenario: Tools

● Version Control

● Build automation

● ContinuousIntegration

Page 18: Continuous integration CloudParty 21 may 2014 - Milan

18

Continuous Integration

Build automation: Phing

<build><dist/><pre-remote-deploy/><remote-deploy/><post-remote-deploy-test/><post-remote-deploy/>

</build>

Page 19: Continuous integration CloudParty 21 may 2014 - Milan

19

Continuous Integration

Pipeline

Page 20: Continuous integration CloudParty 21 may 2014 - Milan

20

Continuous Integration

Pipeline

● 4 environments: CI, IT, UAT, PRODo CI: unit,acceptance and integration test in isolationo IT: db/app migration rollback, BDD between project, Cross browser

testo UAT: Manual customer approval testo PROD: Smoke test and KPI validation/monitoring test

● 9 pipeline for each heterogeneous projects ● Dependencies between environment and projects

Page 21: Continuous integration CloudParty 21 may 2014 - Milan

21

Continuous Integration

Improvement

● Rake build language● All environment for Pipeline not 24h● Continuous Delivery

Page 22: Continuous integration CloudParty 21 may 2014 - Milan

22

Continuous Integration

Thanks for listening

Linkshttp://martinfowler.com/articles/continuousIntegration.html

http://www.thoughtworks.com/continuous-delivery

Page 23: Continuous integration CloudParty 21 may 2014 - Milan

ROMA | LONDON| MILANO | PARIS | MADRID | REUS | BERLIN | BEOGRAD | ISTANBUL | SAN FRANCISCOCIUDAD DE MÉXICO | SÃO PAULO | BOGOTÁ | MUMBAI

Neomobile - Corporate HeadquartersViale Pasteur 78, 00144 Roma – Italy | Tel. +39 0698262553

[email protected]