CI and other tools for feature branch development


Published on

Working in teams is always a challenge. Have you ever had situation when all your team members commit to master branch and right before the release someone accidentally does commit that breaks everything? Or someone haven't finished his feature within the deadline and it holds the release? If yes -- this session is for you as we will talk about how to avoid these situations using feature branch development.

Beside simple idea of having different features in different git branches we will also talk about tools to support this workflow. For example you need multiple team members to work on the same feature and they need a host to see each other changes real life. Or after feature is finished we need to allow QA to do the review and that person should not bother with installing the site locally, switch git branch, set up database etc.

We will talk about project that allows to set up server to spin hosts per branch, copy databases etc.

As this instrument uses CI Jenkins and phing we will talk about them as well. We will see how to edit your phing scripts to fit your project specific tasks, add automated testing on deployments etc.

We will also talk about git flow ( that will help your team to keep branches well organized.

This session is aimed to help your organization to implement feature-branch workflow.

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

CI and other tools for feature branch development

  1. 1. CI and other tools for feature branch development Yuriy Gerasimov Senior Drupal Architect Propeople @ygerasimov
  2. 2. 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
  3. 3. CI, why would I need it? ● Check if the code is according drupal style standards ● Run all kind of tests ● Deploy for manual testing
  4. 4. Feature branch development
  5. 5. Feature branch development
  6. 6. 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
  7. 7. 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
  8. 8. 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
  9. 9. Jenkins ● Jobs – Create – Delete – Update ● All jobs are done with phing
  10. 10. 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
  11. 11. 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
  12. 12. Phing deployment scripts ● Xml file with steps ● Nice console output ● Plenty of plugins for different tools ● Extendable with php
  13. 13. Phing example
  14. 14. Feature branch development
  15. 15. git flow ● Master and Develop branches ● git flow init ● git flow feature start MYFEATURE ● git flow feature finish MYFEATURE ● git flow feature publish MYFEATURE ● ...
  16. 16. git flow ● git flow release start RELEASE ● git flow release publish RELEASE ● git flow release finish RELEASE
  17. 17. Demo ● ● v=IhZ6OczRZqs ● v=p4FqvwY6cFk
  18. 18. Github & Jenkins ● Jenkins plugin to trigger builds on PR
  19. 19. links ● ● wiki.jenkins- ● request-builder-drupal
  20. 20. CI and other tools for feature branch development Yuriy Gerasimov Senior Drupal Architect Propeople @ygerasimov