6. GIT, TASK MANAGER & CI
MAAR WAAROM GIT?
Code delen
Remote
(bare repo)
Donny’s clone
(working directory)
Peters’s clone
(working directory)
Hector’s clone
(working directory)
7. GIT, TASK MANAGER & CI
MAAR WAAROM GIT?
Code delen
- Bare repo -> bevat alle geschiedenis (.git)
- Working copy -> Bare repo + werkmap
8. GIT, TASK MANAGER & CI
MAAR WAAROM GIT?
Code delen
- Bare repo -> bevat alle geschiedenis (.git)
- Working copy -> Bare repo + werkmap
- Iedereen kan een bare repo genereren
Remote
(bare repo)
Donny’s clone
(working directory)
Peters’s clone
(working directory)
Hector’s clone
(working directory)
9. GIT, TASK MANAGER & CI
MAAR WAAROM GIT?
Code delen
- Bare repo -> bevat alle geschiedenis (.git)
- Working copy -> Bare repo + werkmap
Geschiedenis
- Eenvoudig “terugspoelen”
C0
(be3f73)
C1
(fb3a8e)
Remote
C0
(be3f73)
C1
(fb3a8e)
C2
(e42cb7)
Donny’s clone
10. GIT, TASK MANAGER & CI
MAAR WAAROM GIT?
Code delen
- Bare repo -> bevat alle geschiedenis (.git)
- Working copy -> Bare repo + werkmap
Geschiedenis
- Eenvoudig “terugspoelen”
Samenwerken
- git pull
C0
(be3f73)
C1
(fb3a8e)
Remote
C0
(be3f73)
C1
(fb3a8e)
C2
(e42cb7)
Donny’s clone
C3
(f22e4a)
11. GIT, TASK MANAGER & CI
MAAR WAAROM GIT?
Code delen
- Bare repo -> bevat alle geschiedenis (.git)
- Working copy -> Bare repo + werkmap
Geschiedenis
- Eenvoudig “terugspoelen”
Samenwerken
- git pull
C0
(be3f73)
C1
(fb3a8e)
Remote
C0
(be3f73)
C1
(fb3a8e)
C2
(e42cb7)
Donny’s clone
C3
(f22e4a)
C3
(f22e4a)
12. GIT, TASK MANAGER & CI
MAAR WAAROM GIT?
Code delen
- Bare repo -> bevat alle geschiedenis (.git)
- Working copy -> Bare repo + werkmap
Geschiedenis
- Eenvoudig “terugspoelen”
Samenwerken
- git pull
- git push
C0
(be3f73)
C1
(fb3a8e)
Remote
C0
(be3f73)
C1
(fb3a8e)
C2
(e42cb7)
Donny’s clone
C2
(e42cb7)
C3
(f22e4a)
C3
(f22e4a)
13. GIT, TASK MANAGER & CI
MAAR WAAROM GIT?
Code delen
- Bare repo -> bevat alle geschiedenis (.git)
- Working copy -> Bare repo + werkmap
Geschiedenis
- Eenvoudig “terugspoelen”
Samenwerken
- git pull
C0
(be3f73)
C1
(fb3a8e)
Remote
C0
(be3f73)
C3
(e42cb7)
C5
(b22e1f)
Donny’s clone
C2
(e42cb7)
C4
(5fab6e)
14. GIT, TASK MANAGER & CI
MAAR WAAROM GIT?
Code delen
- Bare repo -> bevat alle geschiedenis (.git)
- Working copy -> Bare repo + werkmap
Geschiedenis
- Eenvoudig “terugspoelen”
Samenwerken
- git pull
C0
(be3f73)
C1
(fb3a8e)
Remote
C2
(e42cb7)
Donny’s clone
C2
(b24bf6)
C4
(5fab6e)
C4
(5fab6e)
C5
(b22e1f)
C3
(e42cb7)
C0
(be3f73)
C1
(fb3a8e)
15. GIT, TASK MANAGER & CI
MAAR WAAROM GIT?
Code delen
- Bare repo -> bevat alle geschiedenis (.git)
- Working copy -> Bare repo + werkmap
Geschiedenis
- Eenvoudig “terugspoelen”
Samenwerken
- git pull
- git push
- code samenvoegen (merge)
C0
(be3f73)
C1
(fb3a8e)
Remote
C0
(be3f73)
C1
(fb3a8e)
C2
(e42cb7)
Donny’s clone
C3
(f22e4a)
16. GIT, TASK MANAGER & CI
MAAR WAAROM GIT?
Code delen
- Bare repo -> bevat alle geschiedenis (.git)
- Working copy -> Bare repo + werkmap
Geschiedenis
- Eenvoudig “terugspoelen”
Samenwerken
- git pull
- git push
- code samenvoegen (merge)
...
Remote
...
C2
(e42cb7)
Donny’s clone
C3
(f22e4a)
C3
(f22e4a)
C4
(ba4f33)
17. GIT, TASK MANAGER & CI
MAAR WAAROM GIT?
Code delen
- Bare repo -> bevat alle geschiedenis (.git)
- Working copy -> Bare repo + werkmap
Geschiedenis
- Eenvoudig “terugspoelen”
Samenwerken
- git pull
- git push
- Code samenvoegen (merge)
Branching
- Meer “versies” op 1 machine
...
Donny’s clone - master
...
C3
(f22e4a)
Donny’s clone - feature/enroll
C3
(f22e4a)
C4
(ba4f33)
C5
(c12be1)
18. GIT, TASK MANAGER & CI
MAAR WAAROM GIT?
Code delen
- Bare repo -> bevat alle geschiedenis (.git)
- Working copy -> Bare repo + werkmap
Geschiedenis
- Eenvoudig “terugspoelen”
Samenwerken
- git pull
- git push
- Code samenvoegen (merge)
Branching
- Meer “versies” op 1 machine
- Branches samenvoegen (merge)
...
Donny’s clone - master
...
Donny’s clone - feature/enroll
C3
(f22e4a)
C4
(ba4f33)
C5
(c12be1)
...
C3
(f22e4a)
Donny’s clone - bugfix/newsfeed
C6
(c0ff3e)
C6
(c0ff3e)
C6
(c0ff3e)
20. GIT, TASK MANAGER & CI
TAKEN AUTOMATISEREN
Gulp / Grunt
- File watchers
- Voeren taken uit
- Voorkomt handmatige herhalingen
- Helpen CI
- Gebruiken plugins om taken uit te voeren
21. GIT, TASK MANAGER & CI
TAKEN AUTOMATISEREN
LookLive gebruikt Gulp
- Makkelijkere syntax
- Sneller (op het moment van kiezen)
22. GIT, TASK MANAGER & CI
TAKEN AUTOMATISEREN
Een Gulp pipeline
- Van .scss naar optimised css
.scss
(file changes)
scss -> css
autoprefix css
minify css
reload page
23. GIT, TASK MANAGER & CI
TAKEN AUTOMATISEREN
Een Gulp pipeline
- Van .scss naar optimised .css
- Van .js files naar 1 optimised .js file
.js
(file changes)
jshint
(check syntax)
concat js
uglify
reload page
24. GIT, TASK MANAGER & CI
TAKEN AUTOMATISEREN
Een Gulp pipeline
- Van .scss naar optimised .css
- Van .js files naar 1 optimised .js file
- Van .svg naar iconfont
gulp iconfont
(command)
grab all .svg
(from folder)
generate font
output font
output .css
25. GIT, TASK MANAGER & CI
TAKEN AUTOMATISEREN
Een Gulp pipeline
- Van .scss naar optimised .css
- Van .js files naar 1 optimised .js file
- Van .svg naar iconfont
- Cachebusting
gulp cache
(command)
grab all css/js
(from static/)
generate hash
output json
26. GIT, TASK MANAGER & CI
TAKEN AUTOMATISEREN
Een Gulp pipeline
- Van .scss naar optimised .css
- Van .js files naar 1 optimised .js file
- Van .svg naar iconfont
- Cachebusting
- HTML watcher (mijn favoriet).html
(file changes)
reload page
27. GIT, TASK MANAGER & CI
TAKEN AUTOMATISEREN
Een Gulp pipeline opzetten
- gulpfile.js
28. GIT, TASK MANAGER & CI
TAKEN AUTOMATISEREN
Een Gulp pipeline opzetten
- gulpfile.js
29. GIT, TASK MANAGER & CI
TAKEN AUTOMATISEREN
Een Gulp pipeline opzetten
- gulpfile.js
30. GIT, TASK MANAGER & CI
TAKEN AUTOMATISEREN
Een Gulp pipeline opzetten
- gulpfile.js
- Een voorbeeld task
31. GIT, TASK MANAGER & CI
TAKEN AUTOMATISEREN
Een Gulp pipeline opzetten
- gulpfile.js
- Een voorbeeld task
- Gulp “aan zetten”
32. GIT, TASK MANAGER & CI
TAKEN AUTOMATISEREN
Een Gulp pipeline opzetten
- gulpfile.js
- Een voorbeeld task
- Gulp “aan zetten”
- Je kunt taken ook rechtstreeks aanroepen
gulp iconfont
(command)
grab all .svg
(from folder)
generate font
output font
output .css
38. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins
Infrastuctuur
- Jenkins server op kantoor
Jenkins
39. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins
Infrastuctuur
- Jenkins server op kantoor
- Git server op kantoor
JenkinsGit
40. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins
Infrastuctuur
- Jenkins server op kantoor
- Git server op kantoor
- 2 omgevingen op AWS
Productie
JenkinsGit
Staging
41. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins
Infrastuctuur
- Jenkins server op kantoor
- Git server op kantoor
- 2 omgevingen op AWS
- 3 branches in git
JenkinsGit
productionmaster staging
ProductieStaging
42. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins
Infrastuctuur
- Jenkins server op kantoor
- Git server op kantoor
- 2 omgevingen op AWS
- 3 branches in git
De flow
JenkinsGit
productionmaster staging
e42cb7
b4da55
e42cb7
ProductieStaging
e42cb7
c0ffe3
0ff1c3
43. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins
Infrastuctuur
- Jenkins server op kantoor
- Git server op kantoor
- 2 omgevingen op AWS
- 3 branches in git
De flow
- Master -> staging
JenkinsGit
productionmaster staging
e42cb7
b4da55
e42cb7
b4da55
ProductieStaging
e42cb7
c0ffe3
0ff1c3
44. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins
Infrastuctuur
- Jenkins server op kantoor
- Git server op kantoor
- 2 omgevingen op AWS
- 3 branches in git
De flow
- Master -> staging
- Jenkins git hook
JenkinsGit
productionmaster staging
e42cb7
b4da55
e42cb7
b4da55
ProductieStaging
e42cb7
c0ffe3
0ff1c3
45. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins
Infrastuctuur
- Jenkins server op kantoor
- Git server op kantoor
- 2 omgevingen op AWS
- 3 branches in git
De flow
- Master -> staging
- Jenkins git hook
- Jenkins build
JenkinsGit
productionmaster staging
e42cb7
b4da55
e42cb7
b4da55
ProductieStaging
npm install
pip install
gulp
unit tests
ui tests
e42cb7
git clone
c0ffe3
0ff1c3
46. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins
Infrastuctuur
- Jenkins server op kantoor
- Git server op kantoor
- 2 omgevingen op AWS
- 3 branches in git
De flow
- Master -> staging
- Jenkins git hook
- Jenkins build
- Jenkins deploy
JenkinsGit
productionmaster staging
e42cb7
b4da55
e42cb7
b4da55
ProductieStaging
e42cb7
npm install
pip install
gulp
unit tests
ui tests
git clone
c0ffe3
0ff1c3
47. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins
Infrastuctuur
- Jenkins server op kantoor
- Git server op kantoor
- 2 omgevingen op AWS
- 3 branches in git
De flow
- Master -> staging
- Jenkins git hook
- Jenkins build
- Jenkins deploy
- Jenkins tests
JenkinsGit
productionmaster staging
e42cb7
b4da55
e42cb7
b4da55
ProductieStaging
ui tests
e42cb7
b4da55
npm install
pip install
gulp
unit tests
git clone
c0ffe3
0ff1c3
48. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins
Infrastuctuur
- Jenkins server op kantoor
- Git server op kantoor
- 2 omgevingen op AWS
- 3 branches in git
De flow
- Master -> staging
- Jenkins git hook
- Jenkins build
- Jenkins deploy
- Jenkins tests
- Staging -> production
JenkinsGit
productionmaster staging
e42cb7
b4da55
e42cb7
b4da55
ProductieStaging
e42cb7
b4da55
npm install
pip install
gulp
unit tests
ui tests
git clone
c0ffe3
0ff1c3
49. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins
Infrastuctuur
- Jenkins server op kantoor
- Git server op kantoor
- 2 omgevingen op AWS
- 3 branches in git
De flow
- Master -> staging
- Jenkins git hook
- Jenkins build
- Jenkins deploy
- Jenkins tests
- Staging -> production
- Jenkins build
- Jenkins deploy
JenkinsGit
productionmaster staging
e42cb7
b4da55
e42cb7
b4da55
ProductieStaging
e42cb7
b4da55
npm install
pip install
gulp
unit tests
ui tests
git clone
c0ffe3
0ff1c3
50. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins
Infrastuctuur
- Jenkins server op kantoor
- Git server op kantoor
- 2 omgevingen op AWS
- 3 branches in git
De flow
- Master -> staging
- Jenkins git hook
- Jenkins build
- Jenkins deploy
- Jenkins tests
- Staging -> production
- Jenkins build
- Jenkins deploy
JenkinsGit
productionmaster staging
e42cb7
c0ffe3
0ff1c3
b4da55
e42cb7
b4da55
ProductieStaging
ui tests
e42cb7
b4da55
npm install
pip install
gulp
unit tests
git clone
52. GIT, TASK MANAGER & CI
GIT
Code delen
Geschiedenis
Samen werken
Branching
53. GIT, TASK MANAGER & CI
TASK MANAGER
LookLive gebruikt Gulp
Voorkomt handmatige herhaling
Meerdere pipelines
Kijkt of bestanden veranderen
Handmatig taken uitvoeren (icon fonts, cachebusting)
Eenvoudige syntax
54. GIT, TASK MANAGER & CI
CONTINUOUS INTEGRATION
Constant, automatisch uitrollen
Jenkins als centrale hub
Integratie met git
Voert command-line taken uit (zoals gulp)
Voert tests uit
Upload code naar productie en staging
56. GIT, TASK MANAGER & CI
Verdieping
Pro git (boek)
http://gulpjs.com
https://www.browsersync.io
http://sass-lang.com
https://jenkins-ci.org
Get started with browsersync
Get started with gulp
Automagically load gulp plugins
A successful git branching model