2. 1. What is CI?
2. What is for me?
3. Project, Team and WoW?
4. Gitlab and CI
5. What we did?
6. QA
Agenda
3. First description created on Wikipedia;
Continuous Integration is a Software Engineering term
describing a process that completely rebuilds and tests an
application frequently. Generally it takes the form of a
server process or daemon that monitors a file system or
Source Code Control system for changes and
automatically runs the build process and then runs test
scripts.
1. What is CI?
4. Current description on Wikipedia
In software engineering, continuous integration (CI) is the
practice of merging all developer working copies to a
shared mainline several times a day.
1. What is CI?
5. Description on opensource.com
Continuous integration (CI) is the process of automatically
detecting, pulling, building, and (in most cases) doing unit
testing as source code is changed for a product. CI is the
activity that starts the pipeline.
The goal of CI is to quickly make sure a new change from a
developer is "good" and suitable for further use in the code
base.
1. What is CI?
6. Relies on the following principles;
▪ Maintain a code repository
▪ Every commit should be built
▪ Automate the build
▪ Test in a clone of the production environment
▪ Make the build self-testing
▪ Everyone commits to the baseline every day
▪ Everyone can see the results of the latest build
1. What is CI?
7. ▪Not a new concept
▪A virtual team mate
▪ A good reviewer
▪ Backlog generator
2. What is for me?
8. ▪5 projects
▪PHP and a bit Scala and Python
▪Slim, Symfony, Wordpress
▪Jquery and React
▪AWS as cloud
▪Docker for local devbox
▪Git and Gitlab
3. Project, Team and WoW?
9. + CI
Team;
▪4 backend developer
▪2 UI developer
▪2 BA
▪2 QA
▪1 PO
▪Me
3. Project, Team and WoW?
10. Branching model;
▪Feature branches for every implementation
▪Dynamic development branch
▪Instant release branches
▪The release branch is merged to master after go-live
3. Project, Team and WoW?
11. ▪GitLab offers a continuous integration service.
▪A .gitlab-ci.yml file in the root directory of your repository.
▪If everything runs OK you’ll get a nice green checkmark.
▪More features on Premium version.
4. Gitlab and CI
12. Keywords;
▪Job is the atomic element of Gitlab CI
▪Jobs can be dependent to each other
▪A fail the preceding job will block the following jobs
4. Gitlab and CI
13. Keywords;
▪Stage is the batch of jobs
▪Parallel execution
▪Stages are dependent to former
4. Gitlab and CI
14. Keywords;
▪Runner to execute the jobs
▪Instance of Gitlab Runner
▪Multiple runners
▪Shell, Docker executers
4. Gitlab and CI
15. Keywords;
▪Pipeline is a group of stages
▪Specific branches or workflows.
A simple sample pipeline;
4. Gitlab and CI
17. ▪Pipeline for every branch type (feature, development,
master, release)
▪Logical and hierarchical stages
5. What we did?
18. Stage #1 – Lint
▪To flag programming errors
▪For interpreted languages
5. What we did?
19. Stage #1 – Lint
▪css_linter
▪docker_linter
▪php_linter
▪js_linter
5. What we did?
20. Stage #2 – Check
▪Checking code without execution
▪Static code analysis
▪Dependency checks
5. What we did?
21. ▪code_sniffer: PHP Code Sniffer
▪sec_composer_check: SensioLabs
▪sec_psecio_parse
▪forgotten_debug
▪magic_number: if ($http_status_code === 200)
5. What we did?
22. Stage #3 – Test
▪Execute the code
▪Unittests
▪Functional tests
5. What we did?
23. Stage #3 – Test
▪unittest:withcodecoverage
▪unittest:withoutcodecoverage
▪functional-test:tag1
▪functional-test:tag2
▪functional-test:tag3
5. What we did?
24. Stage #5 – Postrelease
Stage #7 Production
Stage #4 – Release
Stage #6 Report
5. What we did?