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

Continuous Integration with Trunk-based and Fea...

Continuous Integration with Trunk-based and Feature toggle

Continuous Integration with Trunk-based and Feature toggle

Azizi Yazit

July 11, 2022
Tweet

More Decks by Azizi Yazit

Other Decks in Research

Transcript

  1. Continuous Integration (CI) Continuous delivery Continuous integration integrate integrate integrate

    1x 2x 4x automated build DEV OPS Code Plan Test Release O perate Monitor 1 day
  2. Trunk-Based Development (TBD) Trunk-Based Development is a key enabler of

    Continuous Integration DEV OPS Code Plan Test Release O perate Monitor
  3. Trunk-based strategies Branch by Abstraction Use branch-by-abstraction to make complex

    or larger scale changes to to your application incrementally while keeping the system working.
  4. Trunk-based strategies Branch by Abstraction button branch trunk register page

    branch textfield branch component, test & storybook component, test & storybook PR new branch new branch new branch PR pull from mainline pull from mainline PR
  5. Trunk-based strategies Branch by Abstraction button branch trunk register page

    branch textfield branch PR new branch new branch new branch PR pull from mainline pull from mainline PR component, test & storybook component, test & storybook component as abstraction
  6. button branch trunk register page branch textfield branch component, test

    & storybook component, test & storybook PR PR pull from mainline pull from mainline PR new branch new branch Trunk-based strategies Branch by Abstraction new branch Short-lived branches
  7. button branch trunk register page branch textfield branch component, test

    & storybook component, test & storybook new branch new branch new branch PR Trunk-based strategies Branch by Abstraction PR PR pull from mainline pull from mainline Concurrent development Small commit - continuous code review
  8. Trunk-based strategies Feature Toggle Feature Toggles are a powerful technique,

    allowing teams to modify system behavior without changing code. martinfowler.com
  9. Trunk-based strategies Feature Toggle using Angular APP_ INITIALIZER APP STATE

    images taken from flaticon.com Feature Flag Directive App true false true true
  10. Trunk-based strategies Feature Toggle using Angular { “featureA”: true, “featureB”:

    false, “featureC”: true, “featureD”: false, } Feature Flags <div *featureFlag=“‘featureA’”> </div> <div *featureFlag=“‘featureB’”> </div> this will be shown this will be hide https://dev.to/ngconf/feature-flags-in-angular-3ic7
  11. { “featureA”: true, “featureB”: false, “featureC”: true, “featureD”: false, }

    Feature Flags <div *featureFlag=“‘featureB’”> </div> this will be hide https://dev.to/ngconf/feature-flags-in-angular-3ic7 Trunk-based strategies Feature Toggle using Angular <div *featureFlag=“‘featureA’”> </div> this will be shown <div *featureFlag=“‘featureA’”> </div> this will be shown “featureA”: true
  12. Trunk-based strategies Feature Toggle trunk releases feature A branch MVP

    1.0 flag off MVP 1.1 flag on flag removed MVP 2.0 feature A feature A feature B branch pull from mainline
  13. trunk releases feature A branch MVP 1.0 flag on flag

    removed MVP 2.0 feature A feature B branch commit to trunk at least once every 24 hours codebase is always releasable on demand and helps to make Continuous Delivery a reality Trunk-based strategies Feature Toggle flag off MVP 1.1 feature A pull from mainline
  14. Summary Continuous integration complementing Agile and Trunk-based is the key

    enabler for Continuous integration. They are supporting each other to accomplish the goal to speed up the time to ship the product to customers as early as possible. Team should adapt techniques like branch-by- abstraction and feature toggles in day to day development to allow smooth and safe code integration.