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
Design in an AI World
tapps
0
140
How STYLIGHT went responsive
nonsquared
100
6k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
How to train your dragon (web standard)
notwaldorf
97
6.5k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Visualization
eitanlees
150
17k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
240
Documentation Writing (for coders)
carmenintech
77
5.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
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 ได้