WooCommerce Expert @gmazzap github.com/gmazzap https://gmazzap.me PHP developer since 2005, ﬁrst met WordPress in 2006. Moderator at wordpress.stackexchange.com Since 2016 WordPress Engineer at: Giuseppe Mazzapica Continuously Deploying WordPress Continuously Deploying WordPress
and tools, but continuous deployment implies the automation of the transition from development cycle to release cycle, whereas that transition is not automated for continuous delivery. Continuously Deploying WordPress
Release Cycle “You’re doing continuous delivery when: Your software is deployable throughout its lifecycle Your team prioritizes keeping the software deployable over working on new features Anybody can get fast, automated feedback on the production readiness of their systems any time somebody makes a change to them You can perform push-button deployments of any version of the software to any environment on demand Martin Fowler Continuously Deploying WordPress
team clones, edits and updates code repository frequently. At every update, unit tests are started automatically and the QA team is notiﬁcated so they can start code review. Continuously Deploying WordPress
continuous integration At the end of development cycle code is automatically released in a production-like environment (stage), and other tests are automatically started Conﬁguration of the servers is automated, reproducible, scalable, and under version control. It is also manages different environments.
ends successfully on stage (acceptance and user acceptance test pass) the code is released in production with the same routine that occurred for the stage environement. Release in production may happen: automatically, that’s continuous deployment manually (push-the-button), that’s continuous delivery
Control Automated tests at every step If any test fails, the cycle stops and starts over The closer the production environement, the more tests are “black box” Dev/Prod Parity All environments share same setup and technologies Code is environment agnostic Continuous Monitoring
estimations usability tests performance monitoring errors monitoring feedback analysis e g a t S / t s e T quality assurance feature management feature planning Continuous development, ensuring the code is environment agnostic, allows for different focuses for different environments being carefree about the existence of problems related to each speciﬁc environment g n i r o t i n o m Development Production
more a mindset that aims at integrating different skills available across company teams, sharing decisions and responsibilities. Application code is not a separate element, but it is part of an integrated process, which always evolves, and whose reason to be is the research of business value maximization.
Unit, Integration Version Control Build Continuous Integration Continuous Delivery Continuous Deployment Code Deployment Tests Platform Tests Acceptance Maintenance Monitoring to Stage Environment to Production Environment Environment Conﬁguration Stage, Production Release Cycle Development Cycle
does not affect the rest of the process, it is only needed to take into account that the codebase will be made by different elements: WordPress core 3rd-party code (themes, plugins) Custom code (themes, plugins)
version control, but also to automate each step of the development cycle. The most effective solution to obtain both things is to keep custom code under version control and to treat 3rd-party code (including WordPress) as an external dependency.
have a complex “dependency tree”, which is impossible to maintain without a dependency management tool In the PHP world, where also WordPress lives in, the only (as of today) possible solution is Composer getcomposer.org
which is an obstacle to environment agnostic code. Different projects which integrate WordPress and Composer also allow to manage different environments, but aiming for cross-environment parity, different environments should be conﬁgured via environment variables.
CLI Allowing the execution of WordPress-speciﬁc tasks (i.e., creating a user, or activating a plugin) from the command line is a key component towards complete WordPress deployment automation. wp-cli.org