This document discusses continuous integration (CI) and why it should be used. It defines CI as applying quality control through small, frequent changes. The benefits discussed are direct feedback on deployability, control when releasing to production, and the ability to continue developing while automated tests run. It provides an example workflow of how CI is used with Git, a test/acceptance/production environment, and Jenkins to run automated jobs on commits. Future improvements mentioned are improving feature testing, automated rollbacks, and monitoring downtime.
5. Show hands
• Who uses version control?
• Who uses a DTAP (or DTP)?
6. Show hands
• Who uses version control?
• Who uses a DTAP (or DTP)?
• Who uses Features / Context?
7. Show hands
• Who uses version control?
• Who uses a DTAP (or DTP)?
• Who uses Features / Context?
• Who applies Continuous Integration?
8. We’ve all been there
• Implementing a new feature? Involves
putting the site in maintenance for hours
9. We’ve all been there
• Implementing a new feature? Involves
putting the site in maintenance for hours
• Re-clicking all you’ve done local, on Prod
10. We’ve all been there
• Implementing a new feature? Involves
putting the site in maintenance for hours
• Re-clicking all you’ve done local, on Prod
• The client accepts changes on ACC, but
they still end up different on PROD
11. We’ve all been there
• Implementing a new feature? Involves
putting the site in maintenance for hours
• Re-clicking all you’ve done local, on Prod
• The client accepts changes on ACC, but
they still end up different on PROD
• In the end: Frustrated Clients
12. What is it?
"In software engineering, continuous integration (CI)
implements continuous processes of applying quality
control — small pieces of effort, applied frequently.”
Source: Wikipedia
13. What is it?
"In software engineering, continuous integration (CI)
implements continuous processes of applying quality
control — small pieces of effort, applied frequently.”
“Continuous integration aims to improve the quality of
software, and to reduce the time taken to deliver it, by
replacing the traditional practice of applying quality
control after completing all development."
Source: Wikipedia
14. What’s the advantage?
• Direct feedback if it cannot be deployed
Got e-mail? Back to the drawing board.
15. What’s the advantage?
• Direct feedback if it cannot be deployed
Got e-mail? Back to the drawing board.
• In control when going live
Deployed to Test? Then it will work on Production as well.
16. What’s the advantage?
• Direct feedback if it cannot be deployed
Got e-mail? Back to the drawing board.
• In control when going live
Deployed to Test? Then it will work on Production as well.
• Continue developing while CI tool runs
No need to wait.
17. What’s the advantage?
• Direct feedback if it cannot be deployed
Got e-mail? Back to the drawing board.
• In control when going live
Deployed to Test? Then it will work on Production as well.
• Continue developing while CI tool runs
No need to wait.
• Integration with Issue Management
Update issues by committing your change.
19. How we use it
Repository
• develop
• master
D T A P
20. How we use it
Repository
• develop
• master
D T A P
DB + Files
(drush sql-sync / drush rsync)
21. How we use it
Repository
• develop
• master
Code Code Code
D T A P
DB + Files
(drush sql-sync / drush rsync)
22. How we use it
Repository
• develop
• master
commit -m
“Applied X. Fixes #123.”
develop or
master/[TAG]
D T A P
23. How we use it
Repository
• develop Service hooks
• master
commit -m
“Applied X. Fixes #123.”
develop or
master/[TAG]
D T A P
24. How we use it
Repository
• develop Service hooks
• master
commit -m
“Applied X. Fixes #123.”
develop or
master/[TAG] develop
D T A P
25. How we use it
Repository
• develop Service hooks
• master
commit -m
“Applied X. Fixes #123.” manual start
develop or
master/[TAG] develop
D T A P
26. How we use it
Repository
• develop Service hooks
• master
commit -m
“Applied X. Fixes #123.” manual start
develop or
master/[TAG] develop develop
D T A P
27. How we use it
Repository
• develop Service hooks
• master
commit -m
“Applied X. Fixes #123.” manual start
develop or
master/[TAG] develop develop master/[TAG]
D T A P
28. How we use it
Repository
• develop Service hooks
• master
commit -m
“Applied X. Fixes #123.” manual start
develop or
master/[TAG] develop develop master/[TAG]
D T A P
29. Technical set-up
DEV environment Jenkins Git
• LAMP • Tomcat • GitHub/BitBucket
• Git • Apache (as proxy for Tomcat) • Service Hooks
• Git flow • Jenkins plugins: • Service user (read
• Drush • Git only) + ssh key
• Drush alias files • Github
• Git parameter
• Jenkins jobs per project / target Redmine
environment • LAMP
Target envs (T/A/P)
• Shell scripts: • Redmine plugin:
• LAMP
• make-backup.sh • Github webhook
• Drush
• update-code.sh
• SSH key Jenkins user
• apply-updates.sh
in site user authorized
keys
30. Demo
• Issue in Redmine
”Replace latest blogs in footer with single teaser”
31. Demo
• Issue in Redmine
”Replace latest blogs in footer with single teaser”
• Fix on dev & Update Feature
32. Demo
• Issue in Redmine
”Replace latest blogs in footer with single teaser”
• Fix on dev & Update Feature
• Commit with Issue number
33. Demo
• Issue in Redmine
”Replace latest blogs in footer with single teaser”
• Fix on dev & Update Feature
• Commit with Issue number
• Champagne!
34. Future improvements
• Features does not work on all modules
• Automated tests with Jenkins
SimpleTest / Behat / Selennium
• Automated roll-back on errors
• Set monitoring to ‘scheduled downtime’ on
deployments
Welcome all, thanks for attending. And thank you Michel for having me here. We gave this talk at the latest Tech Talk @ Triquanta and due to the great feedback we decided to do it again.\n
LimoenGroen has a mission to create durable websites and a better web. We use Open Source (Drupal), and we make sure they are future-proof and accessible by anyone.\n
AGENDA\nNEXT: Show hands. \n
Surprisingly to see that nearly no-one already applies CI and we saw the same at the Tech Talk. And there is a need, because... NEXT\n
Surprisingly to see that nearly no-one already applies CI and we saw the same at the Tech Talk. And there is a need, because... NEXT\n
Surprisingly to see that nearly no-one already applies CI and we saw the same at the Tech Talk. And there is a need, because... NEXT\n
Surprisingly to see that nearly no-one already applies CI and we saw the same at the Tech Talk. And there is a need, because... NEXT\n
Companies that write down all clicks (content types, views, etc) and re-apply these manually on Acceptance and Production. Companies that export a view and import it on Prod.\n
Companies that write down all clicks (content types, views, etc) and re-apply these manually on Acceptance and Production. Companies that export a view and import it on Prod.\n
Companies that write down all clicks (content types, views, etc) and re-apply these manually on Acceptance and Production. Companies that export a view and import it on Prod.\n
Companies that write down all clicks (content types, views, etc) and re-apply these manually on Acceptance and Production. Companies that export a view and import it on Prod.\n
\n
\n
Not everything can be integrated with Features module. Then we use hook_update_N() scripts. \n
Not everything can be integrated with Features module. Then we use hook_update_N() scripts. \n
Not everything can be integrated with Features module. Then we use hook_update_N() scripts. \n
Not everything can be integrated with Features module. Then we use hook_update_N() scripts. \n