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
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Designing for Timeless Needs
cassininazir
0
130
Visualization
eitanlees
150
17k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
240
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
63
Amusing Abliteration
ianozsvald
0
97
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 ได้