(e)git + tycho + gerrit + mylyn = #win @ eclipse day toulouse 2012
Post on 03-Sep-2014
1.221 Views
Preview:
DESCRIPTION
TRANSCRIPT
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
• (E)Git • + Tycho • + Gerrit • + Mylyn • _______ • = #WIN*
• * mostly
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
What you will learn
§ A better way to go than good ol’ CVS/SVN + PDE Build
§ How Git can improve your development workflow
§ How continuous integration coupled with code review can save you time
§ Where to look for to get started
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ How to actually setup Gerrit, Hudson § How to write better code J
… and what you will not!
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ No central repository § Fast § Branching/Merging made easier
§ easy to experiment new ideas
§ easy to isolate features
DVCSs in a nutshell
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ Created by Linus Torvalds in 2005 § Need for a fast, distributed, corruption-proof
SCM to manage the Linux kernel codebase
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ Staging area § Hooks
§ sending an e-mail
§ rejecting a push if e.g. header files are missing
§ smart management of binary files
§ Stashing, cherry-picking, bisecting, … § Advanced merge strategies § File renaming
§ GitHub! and also bitbucket, Gitorious, …
Git cool features
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ Useful read: http://nvie.com/posts/a-successful-git-branching-model/
Git workflow
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ gitx § SourceTree () § GitHub () § TortoiseGit § EGit
Git tools
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ gitx § SourceTree () § GitHub () § TortoiseGit § EGit
Git tools
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
Git tools – gitx
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ gitx § SourceTree () § GitHub () § TortoiseGit § EGit
Git tools
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
Git tools – SourceTree
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ gitx § SourceTree () § GitHub () § TortoiseGit § EGit
Git tools
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
Git tools – Github
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ gitx § SourceTree () § GitHub () § TortoiseGit § EGit
Git tools
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
Git tools – TortoiseGit
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ gitx § SourceTree () § GitHub () § TortoiseGit § EGit
Git tools
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ Team provider for Git § Git perspective § Integration with the Project Explorer § Synchronize § History
§ Integration with Mylyn
EGit
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
DEMO!
• EGit
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ A way to build, test and release Eclipse/OSGi artifacts with Maven
§ Tycho feature list: § Build OSGi bundles / Eclipse plugins
§ Execute tests within the OSGi runtime
§ Build Eclipse Features
§ Build p2 repositories
§ RCP applications a.k.a. Products
§ …
§ Integrates with the rest of the Maven ecosystem
Tycho
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ What is Maven? A build system! § Tycho is a set of Maven plugins § How is it different from other Maven plugins?
§ It reuses the PDE metadata to configure the build
§ It alters the standard Maven resolution logic to support OSGi dependencies (MANIFEST.MF, feature.xml, etc.)
§ It adds to Maven the ability to read p2 repository
Relationship with Maven
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ What is p2? An OSGi-based provisioning system for OSGi!
§ Tycho reads and downloads dependencies from p2 repositories.
§ Tycho produces p2 repositories § Internally, tycho embeds parts of p2 in order
to perform the dependency resolution § Maven + p2 = Tycho! J
Relationship with p2
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
DEMO!
• Tycho
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ When one developer writes code, another developer is asked to review that code
§ A careful line-by-line critique § Happens in a non-threatening context § Goal is cooperation, not fault-finding § Integral part of coding process § Otherwise this will happen:
§ Debugging someone elses broken code
§ Involuntary code review: Not so good; emotions may flare
http://code.google.com/p/rietveld/downloads/detail?name=Mondrian2006.pdf
Code review?
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ Developped by Google (for Android) § Based on Git
§ Web-based code review tool acting as a Git repository managing pending patches before they are merged into a blessed repository
Gerrit
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
Interacting with a Git repository
Working Tree
Local repository
Remote repository
push
fetch
pull
commit
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
Interacting with a Gerrit repository
Working Tree
Local repository
Blessed repository
fetch
pull
Gerrit push
for review
commit sync
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
Gerrit workflow
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
DEMO!
• Gerrit
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ Mylyn is a task and application lifecycle management (ALM) framework
§ Task-focused interface à realign the IDE so as you only see relevant code/information
§ Huge ecosystem of plug-ins to integrate with ALM and collaboration tools
Mylyn
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
Mylyn
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
DEMO!
• Mylyn
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
Gerrit + Tycho + Jenkins/Hudson – DEMO!
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
§ Git can really help you § Tycho is stable*, powerful, and extensible § Mylyn rocks. Well integrated with JDT, CDT,
EGit, Hudson/Jenkins, Gerrit… § Code review with Gerrit is the icing on the
cake (if you have someone to help you set it up J)
* http://wiki.eclipse.org/CBI
In a nutshell
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0. Eclipse Day Toulouse May 24th,, 2012
Questions? … Thank you! J
Benjamin Cabé @kartben http://blog.benjamin-cabe.com
top related