CI/CD
Continuous Integration / Continuous Delivery
Gabriel Araujo
● I’m not an expert
● Full-Stack Web Developer
● Wordy Curious guy
● Fascinated by automation and
computer-assisted tasks
● Work Experience
○ Jenkins
○ TeamCity
○ Travis
○ VSTS
○ Gitlab CI
○ Codeship
○ ...
What is Continuous Integration?
The practice of regularly
integrating code changes into
the mainline.
More than once,
daily.
“Continuously is more often than you
think.”
- Mike Roberts
Why teams are doing it?
Fail fast,
fail often.
It’s
time-saving.
Ready to deploy at
any time.
Enable project
visibility.
It gives
confidence.
Why teams are not doing it?
One more
thing to
maintain.
Too much
change.
Too much
failed
builds.
Additional costs.
It’s a
developer job.
Extreme Programming Explained
by Kent Beck (1999)
● Sit Together
● Whole Team
● Informative Workspace
● Energized Work
● Pair Programming
● Stories
● Weekly Cycle
● Quarterly Cycle
● Slack
● Ten-Minute Build
● Continuous Integration
● Test-First Programming
● Incremental Design
Commit Code Frequently
● Integrate early and often
○ Integration = Communication
● Avoid late integration
○ long-lived branches
○ Branch-heavy workflow (e.g., gitflow)
○ Time-consuming
○ Prevent developers from using latest
changes
● Make small changes
○ Break down a larger task
○ Feature flags
● Commit after each task
● Up to date mainline
● Conflicts reduced
● Smaller PRs
● Better code review
Automated Builds
● Complicated process but predictable
○ Reproducible on any environment
● From zero to hero with a single command
● Keep the build fast
○ Build what’s needed
○ Lightweight builds (private builds)
○ Caching strategies
● Run automated tests and inspection
○ Generate reports
○ Visualize trends
● Fix broken builds immediately
“Crucially, if the build fails, the development
team stops whatever they are doing and
fixes the problem immediately”
- Jez Humble and David Farley
Criticism
● Builds get broken often
● Unable to fix errors in time
● Code is already on master
● Build flags are ignored
Continuous Integration
vs
Continuous Delivery
vs
Continuous Deployment
Code Build Integrate Test Release Deploy
Continuous Integration
Continuous Delivery
Continuous Deployment
Build and Test
Automated
System
Dev
Dev
Dev
Dev
Dev
Production
Feat 346 Feat 45 Testing Staging
Services and tools
● Jenkins
● Bamboo
● Bitbucket Pipelines
● TeamCity
● VSTS
● Codeship
● Travis CI
● CircleCI
● GO
● Gitlab CI
● Github Actions
● Buildbot
● CruiseControl
● AppVeyor
● Drone.io
● ...
Hands on
And a little bit of code
Gitlab CI Features
● Configuration as code (yaml)
● Your own distributed isolated runners
● Multi-stage and parallel jobs
● Manual deploy gates
● Artifacts storage
● Built-in registry
● Docker, shell, support (main)
● Environments
● Review Apps (preview)
● Caching configs
● Triggers
○ Push
○ Branches, tags (regex)
○ Other pipeline
○ Schedules
○ API
○ Manual (web)
○ Merge requests
○ Chats
Code pushed
to gitlab
unit tests
integration testsbuild deploy
feature/*
develop
stage
Code pushed
to gitlab
lint TS
lint SCSS
unit tests
build
build
build deploy
deploy
deploy destroy
ui tests
feature/*
master
tag
version
Code pushed
to gitlab
lint TS
lint SCSS
unit tests
build
build
build deploy
deploy
deploy destroy
ui tests
Thanks!
Contact me:
Invillia
151 Padre Duarte
Araraquara, SP 14800-360
contato@gabrielaraujo.dev
gabrielaraujo.dev
References
● Continuous Integration - What's the point?
● Why Continuous Integration Doesn’t Work
● Software Configuration Management Patterns: Effective Teamwork,
Practical Integration
● What is a Continuous Integration and Delivery Pipeline, and Why Is It
Important?
● Continuous Integration: Improving Software Quality and Reducing Risk

Constinuous Integration