Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

CODE, TEST, DEPLOY, REPEAT

CODE, TEST, DEPLOY, REPEAT

Continuous delivery, deployment, integration: a lot of buzzwords of our times start with "continuous". But do they exist in real life? Or is this just fantasy? In this session, I'll show how real and impactful CI/CD can be by telling you the story of how we are building "continuous stuff" at VONQ. It's a story about tests, pipelines, automation and feature toggles, but, more importantly, about changing mindsets.

We'll go through each of the stages - coding, testing, deploying (and delivering) - and we'll find out (spoiler!) why the road to continuous delivery is valuable even if you're not going to deploy in production many times per day.

Antonello D'Ippolito

July 30, 2019
Tweet

More Decks by Antonello D'Ippolito

Other Decks in Programming

Transcript

  1. Antonello D'Ippolito CODE TEST DEPLOY REPEAT 5 FAST AND TINY

    PRs CODE REVIEWS PAIR PROGRAMMING CODE
  2. Antonello D'Ippolito CODE TEST DEPLOY REPEAT 7 if (toggleIsOn) {

    $this->newFancyFunctionality(); } else { $this->oldFunctionality(); } FEATURE TOGGLES
  3. Antonello D'Ippolito CODE TEST DEPLOY REPEAT 9 DECOUPLE TOGGLE FROM

    DECISION CENTRALIZE THE LOGIC AVOID CONDITIONALS REMOVE TOGGLES FEATURE TOGGLES
  4. Antonello D'Ippolito CODE TEST DEPLOY REPEAT 10 • github.com/qandidate-labs/qandidate-toggle •

    github.com/qandidate-labs/qandidate-toggle-bundle • github.com/qandidate-labs/qandidate-toggle-api FEATURE TOGGLES qandidate/toggle
  5. Antonello D'Ippolito CODE TEST DEPLOY REPEAT 12 FEATURE TOGGLES qandidate/toggle

    // Create the ToggleManager $manager = new ToggleManager(new InMemoryCollection()); // A toggle that will be active when the user id is less than 42 $operator = new LessThan(42); $condition = new OperatorCondition('user_id', $operator); $toggle = new Toggle('toggling', array($condition)); // Add the toggle to the manager $manager->add($toggle); // Create and check a new context for a user with id 42 $context = new Context(); $context->set('user_id', 42); var_dump($manager->active('toggling', $context)); // false
  6. 14

  7. 15

  8. 16

  9. Antonello D'Ippolito CODE TEST DEPLOY REPEAT 17 SMOKE TESTS USER

    ACCEPTANCE TESTS (BEHAT) TEST UI INTEGRATION UNIT INTEGRATION & COMPONENT TESTS (BEHAT, PHPUNIT) UNIT TESTS (PHPSPEC)
  10. Antonello D'Ippolito CODE TEST DEPLOY REPEAT 22 PIPELINES (JENKINS) DEPLOY

    SETUP PROJECT TEST SUITES MISC. CHECKS BUILD ARTIFACT SETUP PROJECT TEST SUITES MISC. CHECKS BUILD ARTIFACT DEPLOY ACCEPTANCE SETUP PROJECT TEST SUITES MISC. CHECKS BUILD ARTIFACT DEPLOY PRODUCTION SMOKE TESTS PUSH MERGE TAG ACC. TESTS
  11. Antonello D'Ippolito CODE TEST DEPLOY REPEAT 23 MEASURE & MONITOR

    EVERYTHING DEPLOY • API CALLS RESPONSE TIME • CONTROLLERS LOADING TIME • CRONS EXIT STATUS • ERROR LOGS • ...
  12. 30

  13. Antonello D'Ippolito CODE TEST DEPLOY REPEAT 31 FAST FEEDBACK •

    FROM CI • FROM MONITORING • FROM USERS
  14. 33

  15. “ Antonello D'Ippolito CODE TEST DEPLOY REPEAT 35 You can’t

    do it without automating your entire build, deploy, test, and release process. You can’t do it without a comprehensive, reliable set of automated tests. You can’t do it without writing system tests that run against a production-like environment. Continuous Delivery - Jez Humble, David Farley
  16. “ Antonello D'Ippolito CODE TEST DEPLOY REPEAT 36 That’s why,

    even if you can’t actually release every set of changes that passes all your tests, you should aim to create a process that would let you do so if you choose to. Continuous Delivery - Jez Humble, David Farley
  17. Antonello D'Ippolito CODE TEST DEPLOY REPEAT 37 THANKS! (No canaries

    were harmed in the making of this talk) Antonello D'Ippolito @antodippo