Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Importance of CI / CD

Importance of CI / CD

The presentation is about the role a CI / CD pipeline plays in the Software development cycle and the important factors for a team working on automation of their software deployments and releases.

N2Android

August 22, 2019
Tweet

More Decks by N2Android

Other Decks in Technology

Transcript

  1. Introduction • When thinking about the importance of, ◦ CI

    - Continuous Integration ◦ CD - Continuous Delivery / Deployment • Context and the application is important • Software development teams want to, ◦ Automate processes that are repetitive ◦ Make processes reproducible
  2. The Development Team • Product Owner • Business Analysts •

    Designers ◦ UX - User Experience ◦ UI - User Interaction • Developers ◦ Frontend ( Android, iOS, Angular, Flutter, Ionic, etc. ) ◦ Backend ( Java, .NET, etc. ) • Testers / Automation Engineers ◦ Quality Assurance • Scrum Couch / Project Manager
  3. Development Cycle Inputs - Agile Scrum • User stories ◦

    Created by Business Analysts with guidance from Product Owner • Designs for flows ◦ Created from user stories by Design • Product owner prioritises the user stories • Development team ◦ Pre-planning ◦ Sprint planning • Team commits to user stories for the sprint
  4. Requirements for Software Delivery • Well defined requirements (User stories)

    • Team that possess the required skills to deliver • Agile methodologies • Source Control - git, TFS, SVN • CI / CD ◦ Continuous Integration ◦ Continuous Delivery • And much more
  5. Automation Characteristics • Reliability • Maintainability • Testability • Portability

    • Reusability • Automated processes ◦ Automate as much as possible • Limit human error and intervention
  6. Good Practices - Improving Team success • Git - source

    control ◦ Branching Strategy ◦ Release Strategy ◦ Code Reviews • Engineering Principles ◦ Apply Architecture ◦ Measure Code Coverage ◦ Perform Static Code Analysis • Automation ◦ Apply CI / CD ◦ Automated Releases
  7. Why architecture is important • Standardised framework • Consistency •

    Code Maintainability • Loosely Coupled code • Testability • Design Patterns • Makes it easier to onboard new developers to an existing project • Building new features or applying software updates should be faster
  8. Code Reviews • Good code review culture is very important

    • “Do onto others what you would have done unto yourself” • Be kind and open minded when reviewing code ◦ Since you will expect the same when your work is under review / scrutiny • Bad code review cultures are ◦ Stressful ◦ Messy ◦ Create team conflict
  9. Code Review Culture • The dev team, ◦ Validates business

    logic ◦ Checks that architecture and design patterns has been followed ◦ Validates accepted good practices ▪ Unit testing ▪ Styling ▪ Linting • Safe place where mistakes are rather seen as learning opportunities • Keep it constructive • Remember to celebrate coding done well - congratulate awesome work • Be open minded and understand why things were done in a certain way
  10. Code Coverage I • Should validate ◦ Business Rules ◦

    App / Software functionality • Measures risk ◦ Low code coverage increases risk of unknowingly breaking functionality • Provides Metric ◦ Indication to development team and business of how well functionality is being validated ◦ Can be inaccurate if exclusions set up incorrectly
  11. Code Coverage II • Provides feedback on new development ◦

    Easy check to see if functionality and business rules are validated • Think carefully when writing unit tests ◦ Writing tests for the sake of having coverage will force bad practices and useless tests
  12. Static Code Analysis • Static code analysis can be seen

    as the evaluation of code quality ◦ without executing the code • Usually performed on source code in a repository • It automates the review process for the minor things a team has already agreed upon
  13. Static Code Analysis Metrics I • Linting ◦ Rules set

    up by the developers • Code Grading ◦ Code quality • Style Guides ◦ Enforced styling • Tech Debt ◦ Time required to fix existing code base issues • Maintenance
  14. Static Code Analysis Metrics II • Automated Code reviews ◦

    Means the team focuses on the more important things, ▪ Business logic validation ▪ Best Practices ▪ Better ways to solve the same problem ▪ Optimisation ▪ Complexities
  15. Continuous Integration (CI) I • Continuous integration (CI) ◦ Refers

    to the practice of integrating software changes ▪ As frequently as possible ▪ As productively as possible / automation • Frequent integration allows identifying breaking changes (sooner than later) • Allows frequent automated testing to happen • Allows frequent regression testing to happen
  16. Continuous Integration (CI) II • Practice not only intended for

    single code bases ◦ Integrating and testing multiple systems that work together ▪ Allows early identification of introduced regressions in functionality ◦ Automating as much as possible of this process ▪ leads to faster turnaround times
  17. What is CD? (Delivery) Continuous Delivery is an extension of

    Continuous Integration, • Releasing new changes to customers is sustainable and repeatable • On top of having automated testing, ◦ Releasing and deploying the application can be done by the click of a button ▪ At any point in time
  18. Continuous Delivery (CD) I • Is a software engineering approach

    where, ◦ Development teams deliver software in short cycles ◦ The software can be reliably released at any time ◦ The software is never released manually • The approach aims at building, testing and releasing software with greater speed and frequency
  19. Continuous Delivery (CD) II • Helps by reducing, ◦ Cost

    ◦ Time ◦ Risk • By delivering incremental software updates • A straightforward and repeatable deployment process is important for continuous delivery
  20. What is CD? (Deployment) Continuous Deployment extends beyond Continuous Delivery,

    When a software change passed all the steps of your production build pipeline, • The update is released to the customer • No human intervention is required • Only a failed step / test in the pipeline will prevent a release from happening
  21. CI/CD is not DevOps’ responsibility alone • Remember that the

    development team works closely with DevOps • DevOps can assist and help maintain an existing pipeline • Ultimately the whole team should take responsibility to ◦ Update the pipeline components - when required ◦ Maintaining the stability of the pipeline ◦ Improving the build speeds
  22. Benefits of CI/CD? • Automation ◦ Builds ◦ Testing ◦

    Releases • Allows automated enforcement of code practices and rules ◦ Decided by the team • Verify functionality against testing environments • Simplify the deployment of the latest version of the product • All parties can get an overview of what is happening in the process ◦ What is under test ◦ What is getting deployed
  23. Tools for CI/CD • Jenkins • Bitrise • SemaphoreCI •

    CircleCI • TeamCity • Travis • Atlassian Tools Bamboo • CodeShip • And many more