super-powered ci with git - sarah goff-dupont
DESCRIPTION
Continuous integration is a critical part of working as a team and shipping great software. But when you switch to Git, CI can seem chaotic due to the sudden explosion of branches. Learn how to keep it under control with branch builds, shallow clones, repository caching, and other tricks of the trade.TRANSCRIPT
#atlassian
SARAH GOFF-DUPONT • DEV TOOLS MARKETING • ATLASSIAN • @DEVTOOLSUPERFAN
Super-powered CI with Git
W H Y G I T ?
Agenda
C I - F R I E N D LY R E P O S
C I O N F E AT U R E B R A N C H E S
F R E E S T U F F
Why Git?
C I - F R I E N D LY R E P O S
C I O N F E AT U R E B R A N C H E S
G I T H O O K S F O R C I
W H Y G I T ?
branching & merging is a breeze
In Git
775branches in the JIRA code base
Simplest Workflowkeep master green
feature/DEV-30
feature/DEV-45
master
experiment on your feature branch
CI-friendly Repos
C I O N F E AT U R E B R A N C H E S
G I T H O O K S F O R C I
C I - F R I E N D LY R E P O S
W H Y G I T ?
Avoid tracking large files in your
repo.
Just archive it
Shallow clones for the win
Cache the repo on agents
Photo: returndates.com
Built into
CI on Feature Branches
C I O N F E AT U R E B R A N C H E S
G I T H O O K S F O R C I
C I - F R I E N D LY R E P O S
W H Y G I T ?
Simplest Workflow
feature/DEV-30
feature/DEV-45
master
Auto-detect new branches
Photo: Andres Galdamez
Built into
automatically
manually
Branch Build Triggers
feature/DEV-30
master
v 1.2
But it’s not pure CI!
sgd/DEV-30
master
Rebase before merging
how my changes will behave after merging to master
sgd/DEV-30
master
Rebase before merging
Auto-merge feature branches
Shallow clones for the win
Cache the repo on agents
Photo: returndates.com
Auto-merge feature branches
Built into
Integration Workflow
integration
feature/DEV-45
master
back to the drawing board…
Key takeaways:
• Let feature branches do the dirty work
• Say “yes” to shallow clones and repo caching
• All your branch are belong to CI
• Git hooks = ninja powers
#atlassian
Key takeaways:
• Let feature branches do the dirty work
• Say “yes” to shallow clones and repo caching
• All your branch are belong to CI
• Git hooks = ninja powers
#atlassian
Key takeaways:
• Let feature branches do the dirty work
• Say “yes” to shallow clones and repo caching
• All your branch are belong to CI
• Git hooks = ninja powers
#atlassian
Key takeaways:
• Let feature branches do the dirty work
• Say “yes” to shallow clones and repo caching
• All your branch are belong to CI
• Git hooks = ninja powers
#atlassian
Key takeaways:
• Let feature branches do the dirty work
• Say “yes” to shallow clones and repo caching
• All your branch are belong to CI
• Git hooks = ninja powers
#atlassian
•SourceTree
•atlassian.com/git
Free stuff!
Thank you!
SARAH GOFF-DUPONT • DEV TOOLS MARKETING • ATLASSIAN • @DEVTOOLSUPERFAN