how do you implement continuous delivery? part 3: all about pipelines
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
HOW DO YOU IMPLEMENT CONTINUOUS DELIVERY?
Part 3: All about Pipelines
Share this ebook.
PERSPECTIVES
PIPELINE FOR PROGRESSIVE TESTNG
2
With CD, every build is a release candidate
Pipeline for
Progressive Testing
The Testing PyramidPipeline for
Progressive Testing
Faster Feedback
BroaderScope
The Testing PyramidPipeline for
Progressive Testing
The Delivery Pipeline
Faster Feedback
BroaderScope
Faster Feedback
Increasing Confidenc
e
The system being developedPipeline for
Progressive Testing
ApplicationA
ApplicationB
Other Services
The system being developedPipeline for
Progressive Testing
ApplicationA
ApplicationB
Other Services
Unit Tests
Each unit test covers one app component
The system being developedPipeline for
Progressive Testing
Unit Tests
Other components are stubbed
Each unit test covers one app component
Pipeline for
Progressive Testing
Unit Tests
The first stage of the pipeline runs the unit tests
Pipeline for
Progressive Testing
Integration tests cover a group of related components within the application
Integration Tests
Pipeline for
Progressive Testing
Application tests cover an application running in a container, mocking connections to other applications
Application Tests
Pipeline for
Progressive Testing
System tests cover the set of applications developed by the team, running together, mocking connections to external services
System Tests
Pipeline for
Progressive Testing
System integration tests exercise all parts of the system, including external dependencies
SystemIntegration
Tests
PIPELINE FOR DESIGN PATTERNS
14
Application Pipeline
Automated tests
Automated tests
Automated tests
Tested Build
Manual tests Live
Unattended Process
One-click deployments
Pipeline Design
Pattern
Typical pipeline stages
Typical Commit Stage
Commit Stage
1. Developer commits code
to SCM
Pipeline Design
Pattern
Typical pipeline stages
Typical Commit Stage
Commit Stage
1. Developer commits code to SCM
2. Build server checks out &
compiles code
Pipeline Design
Pattern
Typical pipeline stages
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
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
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
Pipeline Design
Pattern
Typical Deployment Testing Stage
Typical pipeline stages
Deployment Testing Stage
1. Prepare environment
Pipeline Design
Pattern
Typical Deployment Testing Stage
Typical pipeline stages
Deployment Testing Stage
1. Prepare environment
2. Retrieve artefact
Pipeline Design
Pattern
Typical Deployment Testing Stage
Typical pipeline stages
Deployment Testing Stage
1. Prepare environment
2. Retrieve artefact
3. Deploy
Pipeline Design
Pattern
Typical Deployment Testing Stage
Typical pipeline stages
Deployment Testing Stage
1. Prepare environment
2. Retrieve artefact
3. Deploy
4. Smoke Test
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
Pipeline Design
Pattern
Other pipeline stages
Typical pipeline stages
Performance testing
Security testing
Exploratory testing
User acceptance
testing
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
Pipeline Design
Pattern
Build Progression
Typical pipeline stages
Pipeline progression
101 ☐ ☐ ☐
Pipeline Design
Pattern
Build Progression
Typical pipeline stages
Pipeline progression
r101 ☐ ☐
If tests fail, work stops until the issue is resolved
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
☐ ☐
☐ ☐
Pipeline Design
Pattern
Build Progression
Typical pipeline stages
Pipeline progression
r101
Multiple builds may go through test without being deployed to production
r102 ☐r103
☐ ☐
☐
☐ ☐
Pipeline Design
Pattern
Build Progression
Typical pipeline stages
Pipeline progression
r101
Deployment to production
r102
r103
r104
☐
☐ ☐
☐
☐ ☐
Pipeline Design
Pattern
Joining multiple applications
Typical pipeline stages
Pipeline progression
Joining multiple applications
Application A
Application B
Application Testing
Complete
Application Testing
Complete
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
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
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
AUTOMATED TESTING
37
Stay tuned for part 4
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.