ci and other tools for feature branch development
TRANSCRIPT
CI and other tools for feature branch development
Yuriy GerasimovSenior Drupal ArchitectPropeople@ygerasimov
Plan
What CI is?
What feature-branch development is?
How do we develop?
Custom tool for supporting feature branch development (server setup, virtual hosts, phing)
Github flow, CI integration, Jenkins
Demo
CI, why would I need it?
Check if the code is according drupal style standards
Run all kind of tests
Deploy for manual testing
Feature branch development
Feature branch development
How do we do development?
Each ticket separate branch
Code review (quality, knowledge sharing)
Each branch should be merge ready before the review
If features are big, discuss the order of merges to minimize amount of work to resolve the conflicts
featurebranch tool
UI to deploy git branches to separate hosts
Update hosts if commits received in corresponding branches
Automatically delete the host if branch is deleted
UI to remove the host
Symfony tool for UI
What is the original git repo?
Keep tracking about changes in branches
Trigger jenkins jobs
Symfony tool got triggered by post-receive hook of git
Jenkins
JobsCreate
Delete
Update
All jobs are done with phing
Server
Wildcard virtual hosts setup
Wildcard domain setup
Drush to be installed
Jenkins should be able to clone to code to virtual hosts folders and create databases
Symfony internals
Pulls remote repo and save the state of branches (yaml file with brahch commit hash pairs)new commits on deployed branches trigger update job on jenkins
Deployed branch has been deleted delete the host
UI to display list of branches and hosts so you can trigger create and delete jobs on jenkins from the UI
Phing deployment scripts
Xml file with steps
Nice console output
Plenty of plugins for different tools
Extendable with php
Phing example
Feature branch development
git flow
Master and Develop branches
git flow init
git flow feature start MYFEATURE
git flow feature finish MYFEATURE
git flow feature publish MYFEATURE
...
git flow
git flow release start RELEASE
git flow release publish RELEASE
git flow release finish RELEASE
Demo
https://github.com/ygerasimov/featurebranch
https://www.youtube.com/watch?v=IhZ6OczRZqs
https://www.youtube.com/watch?v=p4FqvwY6cFk
Github & Jenkins
Jenkins plugin to trigger builds on PR
links
github.com/ygerasimov/featurebranch
wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin
www.lullabot.com/blog/article/github-pull-request-builder-drupal
CI and other tools for feature branch development
Yuriy GerasimovSenior Drupal ArchitectPropeople@ygerasimov