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
Between Models and Reality
mayunak
1
180
Design in an AI World
tapps
0
140
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
49
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Six Lessons from altMBA
skipperchong
29
4.1k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
120
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
sira's awesome portfolio website redesign presentation
elsirapls
0
150
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
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 ได้