drupal continuous integration workflow
TRANSCRIPT
Drupal CI/development workflow by ProPeople
born in Ukraine...
...or how to make developers hate you
Plan:- technologies overview- development rules- team roles- development phases- full workflow- demo- bottlenecks
Technologies, techniks (DevOps)● github, every developer has it’s own fork of master repo● jenkins (github Pull Request builder plugin)● code sniffers stack (PHP CodeSniffer, JSHint, SCSS-lint, twig-
lint)● every PR has it’s own unique drupal site built from scratch● drupal profile/update_path driven development (drush si
profile_name ... for every PR/stage build)● manual code review, functional review before merging
to master branch● vagrant box and drupal codebase in one repo.● reinstall.sh, runsniffers.sh, pull_stage.sh scripts in drupal
subdirectory in repo, executed at CI server every build. Can be used locally.
● github cibox repo for ansible scripts for ability to install whole infrastructure in ~15 minutes.
Rule #1master branch is stable
● No code in master branch without tests/sniffers/review
● Master branch is more stable than stage/production
Rule #2PR creator denied from merging own code
● Code has to be reviewed by other team member before merging
● merge without review means breaking builds
Rule #3 (optional)bugs should be fixed by reviewer
● Review means responsibility● Team has >=2 members that know
how it works
Rule #4There should be 2 siblings at every project for every role● 2 architects/devops (architech + team
lead)● 2 frontend developers (senior +
middle/junior)● 2 devs (senior + junior, middle +
middle)● 1 pm
Roles, Architect● discuss technical solutions with client, gathering
specs● create project architecture (how things should
be implemented)● create tickets, split to subtickets (help from PM)● estimate tickets● code review, code quality assurance● not much coding at all, some research, more
management position than coding
Roles, PM● demos to client, gather specs, bug
reports● make sure all tasks are defined as
tickets● review functionality implementation
from clients perspective● control priorities of execution of
tickets● resources and budget planning
Roles, Developer● implement tickets according to
specifications● code review of other developer’s work
Development phases1 - Reinstall from scratch every build reinstall script2 - Update path, content can be edited at staging pull_stage script3 - SLA(production) update path testing on staging
CI workflow bottlenecksCI server down - commits stuck.Builds become slow on large projects.Decent desktops for dev team(SSD, lot of RAM)Overall process looks/feels slowNon responsible team member can brake a lotTeam should consist from siblingsMinimal task ~ 1 hour
Thank YouQuestions?
Andriy Podanenko, http://dgo.to/@podarokSoftware Architect, DevOpsDruler / ProPeople