Continuous Integration Is for Teams: Moving past buzzword driven development
-
Upload
pantheon -
Category
Technology
-
view
139 -
download
1
Transcript of Continuous Integration Is for Teams: Moving past buzzword driven development
Pantheon.io
Agency and Community Engineer at Pantheon.
stevector on GitHub, Twitter, WordPress.org
Drupal.org
Hi, I’m Steve Persch
Pantheon.io
CTO at Last Call Media
rbayliss on GitHub, Twitter, Drupal.org
I make development processes better
And Rob Bayliss
In the context of websites, Continuous
Integration means frequently combining all
pending code changes with the latest content
from the “real world” of the production
environment. ― Josh Koenig
https://pantheon.io/blog/continuous-integration-delivery-and-deployment-behind-hype
Pantheon.io
Continuous Integration assumes...
http://xkcd.com/303/
● Compilation or building● Which takes significant time
Pantheon.io
"Compiling" happens on-demand
A web page
HTML
OptimizedCSS
OptimizedJavaScript
CMSPHP andDatabase
SourceCSS
SourceJavaScript
OptimizedAssets
SourceAssets
Pantheon.io
Git repo
Drush Make andCustom code
Sass
CoffeeScript
The need for build steps
A web page
HTML
OptimizedCSS
OptimizedJavaScript
CMS
PHP andDatabase
CompiledCSS
Compiled JavaScript
Pantheon.io
Local Copy
Source files and task runners
15
We need build steps
A web page
HTML
OptimizedCSS
OptimizedJavaScript
Live Site
ProductionPHP
SourceCSS
Compiled JS
Production and dev PHP
Git Repo
ComposerAnd custom
code
NPM and custom code
Continuous Integration is all about communication
― Martin Fowler
https://www.martinfowler.com/articles/continuousIntegration.html
Pantheon.io
The guidelines help communication
https://www.martinfowler.com/articles/continuousIntegration.html
● Maintain a Single Source Repository● Automate the Build● Make Your Build Self-Testing● Everyone Commits To the Mainline Every Day● Every Commit Should Build the Mainline on an Integration Machine● Fix Broken Builds Immediately● Keep the Build Fast● Test in a Clone of the Production Environment● Make it Easy for Anyone to Get the Latest Executable● Everyone can see what's happening● Automate Deployment
Pantheon.io20
Continuous Integration: Assembling pieces
Git Repo
ComposerAnd custom
code
NPM and custom code
Backups from Live site
Database and media files
ServerDefinition
FunctioningCopy of Website
Server environment(nginx, version of PHP,
file system)
Code: PHP, CSS, JS
Database and media files
Pantheon.io
LCM Pantheon Workflow
● Work in a feature branch ● Push to Github● CI Runs Tests and deploys to Pantheon Multidev● PR to master● CI runs tests and deploys to Pantheon master
Pantheon.io
Lessons We've Learned
● Start small and iterate● CD is process, not a checkbox● Prioritize flexible tools over single-use ones● Educate yourself about the testing process
https://github.com/LastCallMedia/Drupal-Scaffold