continuous integration using atlassian bamboo
TRANSCRIPT
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
CONTINUOUS INTEGRATION
1
CONTINUOUS INTEGRATION=
EARLY ′′ FAIL FAST ′′ FEEDBACKDevelopers
SourceRepository
Compile
Run unit tests
Run integration tests
Package
Buildprocess
Codecommits
Triggersbuild
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.
TeamCity
3
BGD PROJECTS
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
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
Bamboo
6
REASONS
Bamboo
7
PLAN
STAGE STAGE
JOB
TASK
TASK
TASK
JOB
JOB
TASK
TASK
TASK
JOB
JOB
TASK
STAGE
TASK
TASK
BUILD PROJECT STRUCTURE
Bamboo
8
TASKS = BUILD STEPS
Bamboo
9
ORDERED EXECUTION OF TASKS
SIMULTANEOUSLY EXECUTION
● UI build tasks● Backend build tasks
JOBS=
CONTAINERS FOR TASKS
Bamboo
10
SIMULTANEOUSLY EXECUTION OF JOBS
ALL JOBS IN CURRENT STAGE MUST COMPLETED SUCCESSFULLY BEFORE MOVING TO THE NEXT STAGE
STAGES=
CONTAINERS FOR JOBS
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
Bamboo
12
BUILD PLAN ARTIFACTS
CAN BE SHARED BETWEEN● Jobs● Build Plans● Build Plans to
deployment projects
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
Bamboo
16
DEDICATED AGENTS
BRANCHES
17
CONFIGURATIONS
BRANCHES
18
DASHBOARD
MERGING
19
CONFIGURATIONS
MERGING
20
FAILS
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
Bamboo
14
RELEASES
Bamboo
21
DEPLOYMENT PROJECTS
BGD PROJECTS
22
BRANCHING MODEL
Master Develop
Feature
BACKEND
MasterDevelop
Dev environment
Feature
Release-tag Release-tag
FRONTEND
INTEGRATION
23
WITH JIRA
INTEGRATION
24
WITH JIRA
INTEGRATION
25
WITH BITBUCKET
INTEGRATION
26
DEMO
WITH BITBUCKET & JIRA
Bamboo
27
DEMO
HINTS
Tasks sharing
Rollback
Hot fixes