Build and Release Engineering

10
© ThoughtWorks, 2006 Build and Release Engineering It’s all about automation Jez Humble ThoughtWorks Technologies India Pvt Ltd

description

Build and Release Engineering. It’s all about automation Jez Humble ThoughtWorks Technologies India Pvt Ltd. What is continuous integration?. Keep all your project artefacts in source control (even on a one-person project) Write a script which builds your software and runs tests on it - PowerPoint PPT Presentation

Transcript of Build and Release Engineering

Page 1: Build and Release Engineering

© ThoughtWorks, 2006

Build and Release Engineering

It’s all about automation

Jez Humble

ThoughtWorks Technologies India Pvt Ltd

Page 2: Build and Release Engineering

2

What is continuous integration?

• Keep all your project artefacts in source control (even on a one-person project)

• Write a script which builds your software and runs tests on it

• Every time you add a feature, check in to source control

• Walk over to a machine dedicated to continuous integration, check out the latest version of the code, run the script

Page 3: Build and Release Engineering

3

Why bother?

• Dramatically reduces number of bugs - the default state of your application will be “working in a deployment-like environment”

• Quick feedback on who broke the app and what changes broke it

• Enforces discipline of checking in regularly, therefore less merge hell

• Everyone can see what’s happening

• Easy to get the latest executable

• Makes deployment a snap – therefore quicker feedback from customers

• Creates a natural break for you to think and chat to others

Page 4: Build and Release Engineering

4

Automating build and deployment

• First of all – get continuous integration working

• Then follow the following principles:

– 1. Automate testing and deployment – use several independent testing stages if the tests take too long

– 2. Check working code in regularly – “continuous” is more often than you think

– 3. Deploy the same artefacts in every environment – manage your runtime configuration separately

Page 5: Build and Release Engineering

5

Deploy the same binaries in every environment

Software

Binaries Configuration

Configurationavailable fromsource control,or via LDAPor RESTfulweb service etc.

Page 6: Build and Release Engineering

6

Use several independent testing stages

Binary

Unit tests

Functionalsmoke tests

Functional“happy path”tests

Full functionaltest suite

GUI tests

Performancetests

ManualUAT

Page 7: Build and Release Engineering

7

Automate deployment,using slices and virtualisation

Apache 1

Apache 2

Apache 3

..etc

WebLogic 1

WebLogic 2

WebLogic 3

..etc

Page 8: Build and Release Engineering

8

Run smoke tests

• Can I connect to the DB?

• Is my app server cluster up?

• Is the right version of my app installed?

• Can I send test messages across my messaging bus?

• Can I ping external systems?

Page 9: Build and Release Engineering

9

Evolve yourproduction line along with the application it

assembles

PerformanceDevelopmentUnit

TestsFunctional

TestsProduction

Configuration Repository (environment specific configuration files)

Package Repository (valid binaries)

Source Repository (unit tests, functional tests and code)

Versioned Repository

Ch

eckou

t Co

mm

it

Tag

Tag

Tag

Co

mm

it

Ch

eckou

t

Ch

eckou

t

Ch

eckou

t

Environments

QA

Tests, code and configurations are created. Some manual testing occurs

Automated build executes all unit tests and checks in binaries

Functional tests are automatically executed against binaries

Release candidate is tagged and deployed for further testing

Release candidate is deployed to production

Changes move through the automated deployment production line

UAT