Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
On our CI and Builds
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Nathan Kleyn
March 03, 2015
Programming
2.6k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
On our CI and Builds
Presentation to internal Engineering team on exactly how our builds and CI work.
Nathan Kleyn
March 03, 2015
More Decks by Nathan Kleyn
See All by Nathan Kleyn
Distributed ID Generation
nathankleyn
1
2.3k
Semantic Versioning With Git
nathankleyn
2
400
Exception Handling
nathankleyn
0
160
Cucumber Automation Testing
nathankleyn
3
270
Git: Everything You Need To Know (And A Few More Things)
nathankleyn
3
190
How The VM Works
nathankleyn
0
180
Other Decks in Programming
See All in Programming
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
500
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
350
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
380
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
2
660
Lessons from Spec-Driven Development
simas
PRO
0
180
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
110
Oxlintのカスタムルールの現況
syumai
6
1.1k
さぁV100、メモリをお食べ・・・
nilpe
0
140
JavaDoc 再入門
nagise
0
320
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
10
3.1k
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
260
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
270
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Building the Perfect Custom Keyboard
takai
2
790
The Cost Of JavaScript in 2023
addyosmani
55
10k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
The SEO identity crisis: Don't let AI make you average
varn
0
490
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
380
Being A Developer After 40
akosma
91
590k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The Language of Interfaces
destraynor
162
27k
Transcript
On our CI and BUILDS HOW THEY WORK
Or: How shit gets built and deployed.
Builds involve:
GitHub ∙ CircleCI Ruby ∙ Thor Docker
And copious amounts of:
Swearing ∙ Fear Punching ∙ Hate Quiet Weeping
None
On the PROCESS OF BUILDING A COMMIT
The steps to build:
1. Make a commit.
2. Push to GitHub.
3. CircleCI is notified.
4. The build begins.
5. The Docker build begins.
6. The sanity build begins. (if master)
7. Deployment can begin.
On the PUSHING OF A COMMIT
GitHub receives your commit and dispatches a notification to CircleCI.
Cheers bro. Welcome blud. all of teh infos
CircleCI receives a payload of information telling it what commit
this was.
CircleCI starts a container up for the build.
Boom bitches.
It then looks for our circle.yml file.
Each step of this file is executed.
These steps execute a bunch of shell scripts in /circle.
These steps... ∙ Configure versions of software to use (Ruby,
Java, Kafka, HBase, etc). ∙ Restore the cache. ∙ Checkout the repository. ∙ Build all the projects. ∙ Test all the projects. ∙ Save all the artifacts to CircleCI.
We have three different kinds of builds:
Standard ∙ Docker Sanity
We tell it what scripts to use by passing a
MODE env var.
Demo: The CircleCI build scripts.
On the DOCKER BUILDS OUR CODE IN CONTAINERS
Quick Docker refresher:
Docker is built on the idea of containers.
Many container!
You build images. You deploy containers.
How it happens:
A second parameterised build is started for Docker.
These builds have whatever info they need passed as parameters.
It builds, tags and pushes the Docker images.
The building happens on a separate machine.
The pushed images are stored in the Docker registry.
When we deploy, we pull down these images and run
them (making containers!)
On BUILD SCRIPTS USING AND ABUSING THOR
Thor is a task framework.
I’m actually really sensitive and kind.
All of the things we do on CircleCI are Thor
tasks.
The Thor task sources are in /build-scripts/thor.
Each task is namespaced. thor foo:bar
You can get help for a task by running thor
help task.
All Thor tasks are just Ruby files. Thor is just
a nice DSL.
Demo: The Thor build scripts.
On COMMON PROBLEMS SOLVING COMMON ISSUES
Q: Gradle tasks hanging locally.
A: Start the Nexus server.
Q: Deployments fail as unable to pull from repository.
A: Start the Docker registry.
Q: Docker build fails with “no space left on device”.
A: Restart the Docker server, if it still fails call
for help.
Q: “Expected ID but got nil”.
A: (Sadly) Just retry the build. This is a Docker/library
bug that happens randomly.
Q: The tests are failing.
A: Your tests are shit. Fix your tests.
On BEING A BUILD EXPERT BECOME A ZOMG HACKER
Demo: How to find the build to deploy.
Demo: How to see what SHA is being built for
Docker.
Fin. I’m gonna eat your hairy legs.