Continuous integration using Bamboo

17
www.pentalog.fr Continuous Integration ( CI )

description

Continuous integration using Bamboo

Transcript of Continuous integration using Bamboo

Page 1: Continuous integration using Bamboo

www.pentalog.fr

Continuous Integration ( CI )

Page 2: Continuous integration using Bamboo

October 2013 pentalog.fr 2

Contents

What’s CI?

How does it work?

Why use it?

Bamboo

How we use it

Page 3: Continuous integration using Bamboo

October 2013 pentalog.fr 3

What’s CI?

Concept, not application

The practice of merging all dev working copies with a shared mainline

Main goal : prevent integration problems

Requires no particular tooling to deploy, though a CI server is useful

Page 4: Continuous integration using Bamboo

October 2013 pentalog.fr 4

How does it work?

Page 5: Continuous integration using Bamboo

October 2013 pentalog.fr 5

Why use it?

Reverting to a bug-free state in case of build failures

Avoid last minute chaos at release dates

Immediate unit and integration testing of all changes

Limit the risk of regression

Immediate feedback to developers on the quality, functionality, or system-wide impact of code they are writing

Metrics generated from automated testing and CI focus developers on developing functional, quality code

Page 6: Continuous integration using Bamboo

October 2013 pentalog.fr 6

GIT Branching

master

Launch unit tests

Build OK

Build KO

Commit

project

user 1

user 2

Page 7: Continuous integration using Bamboo

October 2013 pentalog.fr 7

Bamboo

CI server

automated building and testing of software source-code

updates on successful/failed builds

reporting tools for statistical analysis

Build Workflow

Projects Plans Stages Jobs Task

Page 8: Continuous integration using Bamboo

October 2013 pentalog.fr 8

Bamboo Tasks

A Bamboo task is a small discrete unit of work

Source code checkout

Running a script

Parsing test result

Substitute version numbers

Is run sequentially within a job

Has specific requirements

Page 9: Continuous integration using Bamboo

October 2013 pentalog.fr 9

Bamboo Jobs

A Bamboo job is a single build unit within a plan

Processes tasks that are run sequentially on the same agent

Controls the order in which tasks are performed

Collects the requirements of individual tasks in the job, so that these requirements can be matched with agent capabilities

Defines the artifacts that the build will produce

Can only use artifacts produced in a previous stage

Page 10: Continuous integration using Bamboo

October 2013 pentalog.fr 10

Bamboo Agents

A Bamboo agent is a service that can run job builds

2 types:

local agents run as part of the Bamboo server

remote agents run on computers, other than the Bamboo server

Defined set of capabilities

Runs builds for jobs whose requirements match the agent's capabilities.

Page 11: Continuous integration using Bamboo

October 2013 pentalog.fr 11

Bamboo Jobs & Agents

Task 1• Requires A• Requires B

Task 2• Requires C• Requires D

Task 3 • Requires E

Job

Agent 2

Capable of

A

Capable of

B

Capable of

CCapable of

D

Capable of

E

Agent 1

Capable of

A

Capable of

B

Capable of

C

Capable of

D

Page 12: Continuous integration using Bamboo

October 2013 pentalog.fr 12

Bamboo Stages

Stages group jobs to individual steps within a plan's build process.Ex : compilation , test, deployment, etc.

Processes its jobs in parallel, on multiple agents (where available).

Must successfully complete all its jobs before the next stage in the plan can be processed.

May produce artifacts that can be made available for use by a subsequent stage.

Page 13: Continuous integration using Bamboo

October 2013 pentalog.fr 13

Bamboo Plans

A plan defines everything about your continuous integration build process in Bamboo.

Groups jobs into multiple stages.

Processes stages that are run sequentially.

Specifies the default repository

Specifies how the build is triggered

Specifies notifications of build results

Page 14: Continuous integration using Bamboo

October 2013 pentalog.fr 14

Bamboo Build Anatomy

Page 15: Continuous integration using Bamboo

October 2013 pentalog.fr 15

Bamboo Artifacts

Artifacts are files created by a job build.

Logs

Code browser

Code coverage

Copy Detector

Check Style

Mess Detector

Pdepend

Page 16: Continuous integration using Bamboo

October 2013 pentalog.fr 16

How we use it

Practical example

Tests

Failures

Notifications

Page 17: Continuous integration using Bamboo

www.pentalog.fr

Thank you !p e n t a l o g . f r