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

Continuous Integration and Continuous Deploymen...

Continuous Integration and Continuous Deployment for PHP Applications

Sometimes investing in a powerful, automated CI/CD system is a hard sell to the business. Automation requires time that they think is better used to produce features. In this talk, I explain how an iterative and agile approach, combined with robust open-source PHP tools, will allow your team to build an awesome CI/CD pipeline, which will enable you to release code sooner and deliver real business value faster.

Bruno Ricardo Siqueira

October 16, 2019
Tweet

Other Decks in Programming

Transcript

  1. 2 I am Bruno Ricardo Siqueira • Brazilian • ~12

    years in Software Development • Software Engineer, Tech Lead, Software Development Manager • Working at Smartbox since 2016 • PHPSanca, PHPCampinas, PHPSP, PHPDublin Hello!
  2. 3 1. CI/CD definition 2. Which problems to solve? 3.

    Implementation challenges 4. Mindset 5. OSS tools 6. How to sell it to business? Agenda
  3. Continuous Integration Developers practicing continuous integration merge their changes back

    to the main branch as often as possible. The developer's changes are validated by creating a build and running automated tests against the build. [...] Continuous Delivery It is an extension of continuous integration to make sure that you can release new changes to your customers quickly in a sustainable way. This means that on top of having automated your testing, you also have automated your release process and you can deploy your application at any point of time by clicking on a button. [...] 5 Source: https://www.atlassian.com/continuous-delivery/principles/continuous-integration-vs-delivery-vs-deployment
  4. CI • Change conflicts when trying to merge • Pushes

    to the integration branch are proportional to the number of the developers • Long living branches are evil 8
  5. CD • Big releases are risky • Delay to release

    features that are read lead to “money” loss • Development teams get frustrated and less engaged if they don’t see their work in production [1] 9 1: https://continuousdelivery.com/evidence-case-studies/#research
  6. 10

  7. “It requires some trial and error to find a good

    approach for a given context 14
  8. 16

  9. Key enablers Team The team needs to be as auto

    sufficient and diverse as possible Iterative approach Work on a vision, iterate and improve towards the target Engage with business Make sure that product owners and stakeholders are aligned with the CI/CD trade-offs 17 Test automation The test suite needs to be fast, reliable and cover all the critical business logic. Avoid NIH, abuse PFE Be aware about the tradeoffs of Not Invented Here vs Proudly Found Elsewhere. There is no silver bullet Create an understanding about the problems you are proposing to solve
  10. Main categories 19 1 Code quality & static analysis 2

    Test autom ation 3 Pipeline technology
  11. 20 Code quality and static analysis ... and many more

    [2] 2: https://github.com/mre/awesome-static-analysis PHPStan
  12. 22 Test automation PHP infection ... and many more [3]

    3: https://github.com/atinfo/awesome-test-automation/blob/master/php-test-automation.md
  13. Quantify the benefits Time to market Project and raise a

    KPI about how long a feature will take to be in production Less risks Smaller releases are less risky and easy to A/B test or even rollback Application quality Finding issues in the code incrementaly is cheaper and less prone to errors 28 Automation ROI Automation is costly but in the mid/long term less time doing manual steps (testing, deploying, etc) means more time implementing features Team satisfaction CI/CD is about delivering fast and seeing your work in production matters! Happy developers: less attrition Prototyping A fast release proccess means more hability to change features and prototype quickier
  14. Thank you - Danke - Gracias - Merci Grazie -

    Tak - Tack - Dank u - Obrigado