how do you implement continuous delivery? part 3: all about pipelines

38
HOW DO YOU IMPLEMENT CONTINUOUS DELIVERY? Part 3: All about Pipelines Share this ebook. PERSPECTIVES

Upload: thoughtworks

Post on 08-May-2015

2.366 views

Category:

Technology


3 download

DESCRIPTION

In Part 3 of our series on putting CD into practice, we explore setting up a pipeline for progressive testing and various pipeline design patterns.

TRANSCRIPT

Page 1: How do you implement Continuous Delivery? Part 3: All about Pipelines

HOW DO YOU IMPLEMENT CONTINUOUS DELIVERY?

Part 3: All about Pipelines

Share this ebook.

PERSPECTIVES

Page 2: How do you implement Continuous Delivery? Part 3: All about Pipelines

PIPELINE FOR PROGRESSIVE TESTNG

2

Page 3: How do you implement Continuous Delivery? Part 3: All about Pipelines

With CD, every build is a release candidate

Pipeline for

Progressive Testing

Page 4: How do you implement Continuous Delivery? Part 3: All about Pipelines

The Testing PyramidPipeline for

Progressive Testing

Faster Feedback

BroaderScope

Page 5: How do you implement Continuous Delivery? Part 3: All about Pipelines

The Testing PyramidPipeline for

Progressive Testing

The Delivery Pipeline

Faster Feedback

BroaderScope

Faster Feedback

Increasing Confidenc

e

Page 6: How do you implement Continuous Delivery? Part 3: All about Pipelines

The system being developedPipeline for

Progressive Testing

ApplicationA

ApplicationB

Other Services

Page 7: How do you implement Continuous Delivery? Part 3: All about Pipelines

The system being developedPipeline for

Progressive Testing

ApplicationA

ApplicationB

Other Services

Unit Tests

Each unit test covers one app component

Page 8: How do you implement Continuous Delivery? Part 3: All about Pipelines

The system being developedPipeline for

Progressive Testing

Unit Tests

Other components are stubbed

Each unit test covers one app component

Page 9: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline for

Progressive Testing

Unit Tests

The first stage of the pipeline runs the unit tests

Page 10: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline for

Progressive Testing

Integration tests cover a group of related components within the application

Integration Tests

Page 11: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline for

Progressive Testing

Application tests cover an application running in a container, mocking connections to other applications

Application Tests

Page 12: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline for

Progressive Testing

System tests cover the set of applications developed by the team, running together, mocking connections to external services

System Tests

Page 13: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline for

Progressive Testing

System integration tests exercise all parts of the system, including external dependencies

SystemIntegration

Tests

Page 14: How do you implement Continuous Delivery? Part 3: All about Pipelines

PIPELINE FOR DESIGN PATTERNS

14

Page 15: How do you implement Continuous Delivery? Part 3: All about Pipelines

Application Pipeline

Automated tests

Automated tests

Automated tests

Tested Build

Manual tests Live

Unattended Process

One-click deployments

Pipeline Design

Pattern

Typical pipeline stages

Page 16: How do you implement Continuous Delivery? Part 3: All about Pipelines

Typical Commit Stage

Commit Stage

1. Developer commits code

to SCM

Pipeline Design

Pattern

Typical pipeline stages

Page 17: How do you implement Continuous Delivery? Part 3: All about Pipelines

Typical Commit Stage

Commit Stage

1. Developer commits code to SCM

2. Build server checks out &

compiles code

Pipeline Design

Pattern

Typical pipeline stages

Page 18: How do you implement Continuous Delivery? Part 3: All about Pipelines

Typical Commit Stage

Commit Stage

1. Developer commits code to SCM

2. Build server checks out &

compiles code

3. Unit tests

Pipeline Design

Pattern

Typical pipeline stages

Page 19: How do you implement Continuous Delivery? Part 3: All about Pipelines

Typical Commit Stage

Commit Stage

1. Developer commits code to SCM

2. Build server checks out & compiles

code

3. Unit tests

4. Code analysis

Pipeline Design

Pattern

Typical pipeline stages

Page 20: How do you implement Continuous Delivery? Part 3: All about Pipelines

Typical Commit Stage

Commit Stage

1. Developer commits code to SCM

2. Build server checks out &

compiles code

3. Unit tests

4. Code analysis

5. Create build artefact

Pipeline Design

Pattern

Typical pipeline stages

Page 21: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Typical Deployment Testing Stage

Typical pipeline stages

Deployment Testing Stage

1. Prepare environment

Page 22: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Typical Deployment Testing Stage

Typical pipeline stages

Deployment Testing Stage

1. Prepare environment

2. Retrieve artefact

Page 23: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Typical Deployment Testing Stage

Typical pipeline stages

Deployment Testing Stage

1. Prepare environment

2. Retrieve artefact

3. Deploy

Page 24: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Typical Deployment Testing Stage

Typical pipeline stages

Deployment Testing Stage

1. Prepare environment

2. Retrieve artefact

3. Deploy

4. Smoke Test

Page 25: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Typical Deployment Testing Stage

Typical pipeline stages

Deployment Testing Stage

1. Prepare environment

2. Retrieve artefact

3. Deploy

4. Smoke Test

5. Automated UI tests

Page 26: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Other pipeline stages

Typical pipeline stages

Performance testing

Security testing

Exploratory testing

User acceptance

testing

Page 27: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Best practices for pipeline stages

Typical pipeline stages

Keep everything in source control

Only build artefacts once

Replicate production constraints

Deploy the same way every time

Keep it simple, implement only those stages that make sense for your system

Page 28: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Build Progression

Typical pipeline stages

Pipeline progression

101 ☐ ☐ ☐

Page 29: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Build Progression

Typical pipeline stages

Pipeline progression

r101 ☐ ☐

If tests fail, work stops until the issue is resolved

Page 30: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Build Progression

Typical pipeline stages

Pipeline progression

r101

The fix is committed, and a new build goes through the pipeline from the beginning

r102

☐ ☐

☐ ☐

Page 31: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Build Progression

Typical pipeline stages

Pipeline progression

r101

Multiple builds may go through test without being deployed to production

r102 ☐r103

☐ ☐

☐ ☐

Page 32: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Build Progression

Typical pipeline stages

Pipeline progression

r101

Deployment to production

r102

r103

r104

☐ ☐

☐ ☐

Page 33: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Joining multiple applications

Typical pipeline stages

Pipeline progression

Joining multiple applications

Application A

Application B

Application Testing

Complete

Application Testing

Complete

Page 34: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Joining multiple applications

Typical pipeline stages

Pipeline progression

Joining multiple applications

Application A

Application B

Application Testing

Complete

Application Testing

Complete

Integration Testing

If tests fail for application A,

application B can still proceed using the last

“good” version of A

LIVE

Page 35: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Federated pipelines

Typical pipeline stages

Pipeline progression

Joining multiple applications

Pre-release testing

Provider

Provider team could host instances for testing…

Consumer

Page 36: How do you implement Continuous Delivery? Part 3: All about Pipelines

Pipeline Design

Pattern

Federated pipelines

Typical pipeline stages

Pipeline progression

Joining multiple applications

Pre-release testing

Provider

Provider team could host instances for testing…

Consumer

LIVE

Consumer contract tests

…or provide packages for deployment by the Consumer team

Page 37: How do you implement Continuous Delivery? Part 3: All about Pipelines

AUTOMATED TESTING

37

Stay tuned for part 4

Page 38: How do you implement Continuous Delivery? Part 3: All about Pipelines

LEARN MORE

Deploy a great product faster.Agile teams deliver working software early and often.Go automates and streamlines the build-test-release cycle for worry-free, continuous delivery of your product.

Share this ebook.

Visit our Continuous Delivery Channel for more posts like this.