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

6,588 views

Published on

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.

Published in: Technology, Business

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

  1. 1. HOW DO YOU IMPLEMENT CONTINUOUS DELIVERY? Part 3: All about Pipelines Share this ebook. PERSPECTIVES
  2. 2. PIPELINE FOR PROGRESSIVE TESTNG 2
  3. 3. With CD, every build is a release candidate Pipeline for Progressive Testing 
  4. 4. The Testing Pyramid Pipeline for Progressive Testing Faster Feedback Broader Scope
  5. 5. The Testing Pyramid Pipeline for Progressive Testing The Delivery Pipeline Faster Feedback Broader Scope Faster Feedback Increasing Confidence
  6. 6. The system being developed Pipeline for Progressive Testing Application A Application B Other Services
  7. 7. The system being developed Pipeline for Progressive Testing Application A Application B Other Services Unit Tests Each unit test covers one app component
  8. 8. The system being developed Pipeline for Progressive Testing Unit Tests Other components are stubbed Each unit test covers one app component
  9. 9. Pipeline for Progressive Testing Unit Tests The first stage of the pipeline runs the unit tests
  10. 10. Pipeline for Progressive Testing Integration tests cover a group of related components within the application Integration Tests
  11. 11. Pipeline for Progressive Testing Application tests cover an application running in a container, mocking connections to other applications Application Tests
  12. 12. Pipeline for Progressive Testing System tests cover the set of applications developed by the team, running together, mocking connections to external services System Tests
  13. 13. Pipeline for Progressive Testing System integration tests exercise all parts of the system, including external dependencies System Integration Tests
  14. 14. PIPELINE FOR DESIGN PATTERNS 14
  15. 15. Application Pipeline Automated tests Automated tests Automated tests Tested Build Manual tests Live Unattended Process One-click deployments Pipeline Design Pattern Typical pipeline stages
  16. 16. Typical Commit Stage Commit Stage 1. Developer commits code to SCM Pipeline Design Pattern Typical pipeline stages
  17. 17. Typical Commit Stage Commit Stage 1. Developer commits code to SCM 2. Build server checks out & compiles code Pipeline Design Pattern Typical pipeline stages
  18. 18. 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
  19. 19. 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
  20. 20. 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
  21. 21. Pipeline Design Pattern Typical Deployment Testing Stage Typical pipeline stages Deployment Testing Stage 1. Prepare environment
  22. 22. Pipeline Design Pattern Typical Deployment Testing Stage Typical pipeline stages Deployment Testing Stage 1. Prepare environment 2. Retrieve artefact
  23. 23. Pipeline Design Pattern Typical Deployment Testing Stage Typical pipeline stages Deployment Testing Stage 1. Prepare environment 2. Retrieve artefact 3. Deploy
  24. 24. Pipeline Design Pattern Typical Deployment Testing Stage Typical pipeline stages Deployment Testing Stage 1. Prepare environment 2. Retrieve artefact 3. Deploy 4. Smoke Test
  25. 25. 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
  26. 26. Pipeline Design Pattern Other pipeline stages Typical pipeline stages  Performance testing  Security testing  Exploratory testing  User acceptance testing
  27. 27. 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
  28. 28. Pipeline Design Pattern Build Progression Typical pipeline stages Pipeline progression 101
  29. 29. Pipeline Design Pattern Build Progression Typical pipeline stages Pipeline progression r101 If tests fail, work stops until the issue is resolved
  30. 30. 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
  31. 31. Pipeline Design Pattern Build Progression Typical pipeline stages Pipeline progression r101 Multiple builds may go through test without being deployed to production r102 r103
  32. 32. Pipeline Design Pattern Build Progression Typical pipeline stages Pipeline progression r101 Deployment to production r102 r103 r104
  33. 33. Pipeline Design Pattern Joining multiple applications Typical pipeline stages Pipeline progression Joining multiple applications Application A Application B Application Testing Complete Application Testing Complete
  34. 34. 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
  35. 35. 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
  36. 36. 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
  37. 37. AUTOMATED TESTING 37 Stay tuned for part 4
  38. 38. 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.

×