Your SlideShare is downloading. ×
CI and other tools for feature branch development
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

CI and other tools for feature branch development

794

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 …

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 https://github.com/ygerasimov/featurebranch 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 (http://nvie.com/posts/a-successful-git-branching-model) 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
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
794
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
11
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. CI and other tools for feature branch development Yuriy Gerasimov Senior Drupal Architect Propeople @ygerasimov
  • 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. 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. Feature branch development
  • 5. Feature branch development
  • 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. 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. 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. Jenkins ● Jobs – Create – Delete – Update ● All jobs are done with phing
  • 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. 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. Phing deployment scripts ● Xml file with steps ● Nice console output ● Plenty of plugins for different tools ● Extendable with php
  • 13. Phing example
  • 14. Feature branch development
  • 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. git flow ● git flow release start RELEASE ● git flow release publish RELEASE ● git flow release finish RELEASE
  • 17. Demo ● https://github.com/ygerasimov/featurebranch ● https://www.youtube.com/watch? v=IhZ6OczRZqs ● https://www.youtube.com/watch? v=p4FqvwY6cFk
  • 18. Github & Jenkins ● Jenkins plugin to trigger builds on PR
  • 19. links ● github.com/ygerasimov/featurebranch ● wiki.jenkins- ci.org/display/JENKINS/GitHub+Plugin ● www.lullabot.com/blog/article/github-pull- request-builder-drupal
  • 20. CI and other tools for feature branch development Yuriy Gerasimov Senior Drupal Architect Propeople @ygerasimov

×