continuous integration using atlassian bamboo

28
Continuous Integration using Atlassian Bamboo CONTENT Continuous Integration & Continuous Delivery Teamcity vs Bamboo Bamboo overview: Plans, Stages, Jobs, Tasks Bamboo agents Branches & Merging CD in Bamboo: Deployment Plans, Releases BGD projects example Integration with Jira and Bitbucket

Upload: alexander-masalov

Post on 16-Apr-2017

255 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: Continuous integration using atlassian bamboo

Continuous Integration using Atlassian Bamboo

CONTENT Continuous Integration & Continuous Delivery

Teamcity vs Bamboo

Bamboo overview: Plans, Stages, Jobs, Tasks

Bamboo agents

Branches & Merging

CD in Bamboo: Deployment Plans, Releases

BGD projects example

Integration with Jira and Bitbucket

Page 2: Continuous integration using atlassian bamboo

CONTINUOUS INTEGRATION

1

CONTINUOUS INTEGRATION=

EARLY ′′ FAIL FAST ′′ FEEDBACKDevelopers

SourceRepository

Compile

Run unit tests

Run integration tests

Package

Buildprocess

Codecommits

Triggersbuild

Page 3: Continuous integration using atlassian bamboo

CONTINUOUS DELIVERY

2

DevelopersSource

Repository

Codecommits

Compile

Run unit tests

Run integration tests

Package

Build process

Web Server

Deploys application

CONTINUOUS DELIVERY

Continuous Delivery is the natural extension of Continuous Integration: an approach in which teams ensure that every change to the system is releasable, and that we can release any version at the push of a button.

Page 4: Continuous integration using atlassian bamboo

TeamCity

3

BGD PROJECTS

Page 5: Continuous integration using atlassian bamboo

TeamCity

4

PROBLEMS

A LOT OF PROJECTSx = (project for build + project for deployment) * environments 1

HOW TO IDENTIFY WHAT IS DEPLOYED? 2

NO EASY WAYS TO INTEGRATE WITH JIRA 3

HARD TO MAINTAIN 4

Page 6: Continuous integration using atlassian bamboo

Bamboo

5

REASONS

A LOT OF PROJECTS BUILD AND DEPLOYMENT PROJECTS ARE SPLITTED 1

HOW TO IDENTIFY WHAT IS DEPLOYED?DASHBOARDS FOR BUILD AND DEPLOYMENT PROJECTS 2

NO EASY WAYS TO INTEGRATE WITH JIRAGOOD INTEGRATION WITH ATLASSIAN STACK 3

HARD TO MAINTAINLACK OF PLUGINS, BUT EVERYTHING CAN BE DONE WITH POWERSHELL 4

Page 7: Continuous integration using atlassian bamboo

Bamboo

6

REASONS

Page 8: Continuous integration using atlassian bamboo

Bamboo

7

PLAN

STAGE STAGE

JOB

TASK

TASK

TASK

JOB

JOB

TASK

TASK

TASK

JOB

JOB

TASK

STAGE

TASK

TASK

BUILD PROJECT STRUCTURE

Page 9: Continuous integration using atlassian bamboo

Bamboo

8

TASKS = BUILD STEPS

Page 10: Continuous integration using atlassian bamboo

Bamboo

9

ORDERED EXECUTION OF TASKS

SIMULTANEOUSLY EXECUTION

● UI build tasks● Backend build tasks

JOBS=

CONTAINERS FOR TASKS

Page 11: Continuous integration using atlassian bamboo

Bamboo

10

SIMULTANEOUSLY EXECUTION OF JOBS

ALL JOBS IN CURRENT STAGE MUST COMPLETED SUCCESSFULLY BEFORE MOVING TO THE NEXT STAGE

STAGES=

CONTAINERS FOR JOBS

Page 12: Continuous integration using atlassian bamboo

Bamboo

11

PLANS=

CONTAINERS FOR STAGES

● Can be triggered (for example, by changes to source control)

PLAN ORGANIZES WHOLE BUILD PIPELINE, VARIABLES, PERMISSIONS, NOTIFICATIONS, .. TRIGGERS

Page 13: Continuous integration using atlassian bamboo

Bamboo

12

BUILD PLAN ARTIFACTS

CAN BE SHARED BETWEEN● Jobs● Build Plans● Build Plans to

deployment projects

Page 14: Continuous integration using atlassian bamboo

Bamboo

15

AGENTS

Plan ACME

Build no.ACME-123

Build ACME

Network

Capability requirementsBuilder = MavenJDK = 1.5Custom: fast build = true

Shared local capabilities

Builder = AntJDK = 1.5

Shared local capabilities

Builder = MavenJDK = 1.4

Agent-specific capabilities

JDK = 1.5Custom: fast build = true

Remote Agent 2

Remote Agent 3

Remote Agent 1

BAMBOO SERVERLocal Agent 1Local Agent 2

Plan ACME submitsbuild number 123to the Build Queue

The Build Queue forwards build n.o. ACME-123 to the next available agent whose capabilities meet Plan ACME’s requirements. (Note: agent-specific capabilities override shared capabilities)

An agent can run a job if its capabilities match the requirements of a job:

an executable (e.g. Node Js)

a JDK

a Version Control System client application (e.g. Git)

a custom capability. This is a key-value property which defines a particular characteristic of an agent

Page 15: Continuous integration using atlassian bamboo

Bamboo

16

DEDICATED AGENTS

Page 16: Continuous integration using atlassian bamboo

BRANCHES

17

CONFIGURATIONS

Page 17: Continuous integration using atlassian bamboo

BRANCHES

18

DASHBOARD

Page 18: Continuous integration using atlassian bamboo

MERGING

19

CONFIGURATIONS

Page 19: Continuous integration using atlassian bamboo

MERGING

20

FAILS

Page 20: Continuous integration using atlassian bamboo

Bamboo

13

RELEASES

Release is a snapshot of any number of artifacts that will be used in the deployment process and their associated metadata, such as JIRA issues, code changes and any test metadata

A release is created from the result of a single build

Page 21: Continuous integration using atlassian bamboo

Bamboo

14

RELEASES

Page 22: Continuous integration using atlassian bamboo

Bamboo

21

DEPLOYMENT PROJECTS

Page 23: Continuous integration using atlassian bamboo

BGD PROJECTS

22

BRANCHING MODEL

Master Develop

Feature

BACKEND

MasterDevelop

Dev environment

Feature

Release-tag Release-tag

FRONTEND

Page 24: Continuous integration using atlassian bamboo

INTEGRATION

23

WITH JIRA

Page 25: Continuous integration using atlassian bamboo

INTEGRATION

24

WITH JIRA

Page 26: Continuous integration using atlassian bamboo

INTEGRATION

25

WITH BITBUCKET

Page 27: Continuous integration using atlassian bamboo

INTEGRATION

26

DEMO

WITH BITBUCKET & JIRA

Page 28: Continuous integration using atlassian bamboo

Bamboo

27

DEMO

HINTS

Tasks sharing

Rollback

Hot fixes