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
Day 2 - CI
Search
offz
April 20, 2017
0
57
Day 2 - CI
offz
April 20, 2017
Tweet
Share
More Decks by offz
See All by offz
TM-P2-IT-security
offfffz
0
24
Docker Compose for Rails Developer
offfffz
1
37
Day 2 - Docker
offfffz
0
45
Day 1 - Git
offfffz
0
90
Day 1 - Testing
offfffz
0
49
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Paper Plane (Part 1)
katiecoart
PRO
0
4.1k
Facilitating Awesome Meetings
lara
57
6.8k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
180
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
180
Odyssey Design
rkendrick25
PRO
1
490
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
160
Prompt Engineering for Job Search
mfonobong
0
160
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Ruling the World: When Life Gets Gamed
codingconduct
0
140
A Modern Web Designer's Workflow
chriscoyier
698
190k
Transcript
Continuous Integration
CI ดีอย่างไร 1. ทำงานบ่อย 2. รายงานผลการทำงาน กลับไปที่ Gitlab 3. ทำงานอัตโนมัติ
CI ทำงานอย่างไร 1. เริ่มทำงานเมื่อมี commit ใหม่ใน server 2. clone ทั้ง
project ลงไปที่ runner 3. ทำงานตาม script (unit test, UI test, style test) 4. รายงานสถานะ กลับไปที่ Gitlab
CI ทำให้เรามั่นใจเรื่อง ? - มั่นใจว่า software ทำงานตามที่เราสั่ง - มั่นใจว่ามี test
case ครอบคลุม - มั่นใจว่า performance ดี เร็ว - มั่นใจว่า code สวย
CI ไม่ทำให้เรามั่นใจเรื่อง ? - อย่ามั่นใจว่า software ทำงานถูก - อย่ามั่นใจว่า software
สวย น่าใช้ - อย่ามั่นใจว่า user จะชอบมัน
Workflow
Old Workflow Dev Test Deploy
Automated Flow Dev & Test Script Gitlab Gitlab Runner
Host
Flow Build Image Run Test Rename Tag Run Deploy
Flow Build Image
Flow Run Test
Flow Rename Tag
Flow Run Deploy
Flow Build Image Run Test Rename Tag Run Deploy
Gitlab Runner
Gitlab Runner
Gitlab Runner docker run -d \ --name gitlab-runner \ --restart
always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /srv/gitlab-runner/config:/etc/gitlab-runner \ gitlab/gitlab-runner:latest
Gitlab Runner docker exec -it gitlab-runner \ gitlab-runner register -n
--url $GITLAB_HOST/ci --registration-token $TOKEN --executor docker --description $DESCRIPTION --docker-image "docker:latest" --docker-privileged
walkthrough 01 1. clone chidchat 2. รัน unit test 3.
รัน UI test
walkthrough 02 1. รัน server ที่ port 5000 2. รัน
client 2 ตัว ให้ connect ไปที่ localhost:5000 3. พิมพ์ code :sob: แล้วกดส่ง
exercise 01 1. เข้าเว็บ https://www.emojicopy.com 2. เลือก emoji มา 1
ตัว และคิด code 3. สร้าง issue ใน gitlab, สร้าง branch และ MR 4. ทำให้ server สามารถอ่าน code แล้วส่งออกมาเป็น emoji ได้ 5. ทำให้ MR อยู่ในสถานะ merge ได้