Contenu connexe Similaire à (E)Git + Tycho + Gerrit + Mylyn = #WIN @ Eclipse Day Toulouse 2012 (20) Plus de Benjamin Cabé (20) (E)Git + Tycho + Gerrit + Mylyn = #WIN @ Eclipse Day Toulouse 20121. • (E)Git
• + Tycho
• + Gerrit
• + ______
Mylyn
• _
• = #WIN * • * mostly
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
2. 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
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
3. … and what you will not!
§ How to actually setup Gerrit, Hudson
§ How to write better code J
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
4. DVCSs in a nutshell
§ No central repository
§ Fast
§ Branching/Merging made easier
§ easy to experiment new ideas
§ easy to isolate features
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
5. § Created by Linus Torvalds in 2005
§ Need for a fast, distributed, corruption-proof
SCM to manage the Linux kernel codebase
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
6. Git cool features
§ 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, …
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
7. Git workflow
§ Useful read:
http://nvie.com/posts/a-successful-git-
branching-model/
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
8. Git tools
§ gitx
§ SourceTree ()
§ GitHub ()
§ TortoiseGit
§ EGit
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
9. Git tools
§ gitx
§ SourceTree ()
§ GitHub ()
§ TortoiseGit
§ EGit
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
10. Git tools – gitx
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
11. Git tools
§ gitx
§ SourceTree ()
§ GitHub ()
§ TortoiseGit
§ EGit
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
12. Git tools – SourceTree
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
13. Git tools
§ gitx
§ SourceTree ()
§ GitHub ()
§ TortoiseGit
§ EGit
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
14. Git tools – Github
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
15. Git tools
§ gitx
§ SourceTree ()
§ GitHub ()
§ TortoiseGit
§ EGit
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
16. Git tools – TortoiseGit
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
17. Git tools
§ gitx
§ SourceTree ()
§ GitHub ()
§ TortoiseGit
§ EGit
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
18. EGit
§ Team provider for Git
§ Git perspective
§ Integration with the Project Explorer
§ Synchronize
§ History
§ Integration with Mylyn
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
19. DEMO!
• EGit
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
20. Tycho
§ 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
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
21. Relationship with Maven
§ 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
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
22. Relationship with p2
§ 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
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
23. DEMO!
• Tycho
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
24. Code review?
§ 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
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
25. Gerrit
§ 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
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
26. Interacting with a Git repository
Working Tree fetch
pull
commit Remote
repository
push
Local repository
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
27. Interacting with a Gerrit repository
fetch Blessed
Working Tree
pull repository
commit sync
push
Local repository Gerrit
for review
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
28. Gerrit workflow
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
29. DEMO!
• Gerrit
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
30. Mylyn
§ 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
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
31. Mylyn
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
32. DEMO!
• Mylyn
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
33. Gerrit + Tycho + Jenkins/Hudson – DEMO!
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
34. In a nutshell
§ 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
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012
35. Questions? … Thank you! J
Benjamin Cabé
@kartben
http://blog.benjamin-cabe.com
Eclipse Day Toulouse Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
May 24th,, 2012