Skip to content

03. Git Flows & CI CD

hataerin edited this page Aug 30, 2020 · 1 revision

Git flow / CI/CD

img

git flow

๋ฐฐํฌ ์‚ฌ์ดํด

  • master: ๋ฆฌ์–ผ ์„œ๋ฒ„์— ๋ฐฐํฌ๋˜๋Š” ์„œ๋น„์Šค
  • hotfix: ๋ฆฌ์–ผ ์„œ๋ฒ„์—์„œ ๊ธด๊ธ‰์ƒํ™ฉ ๋ฐœ์ƒ์‹œ ์‚ฌ์šฉ
  • realease: realease/v0.0 ํ˜•์‹์œผ๋กœ ์ƒ์„ฑ, ์Šคํ”„๋ฆฐํŠธ ๋‹จ์œ„๋กœ ๋ฒ„์ €๋‹ ๊ณ„ํš

๊ฐœ๋ฐœ ์‚ฌ์ดํด

  • develop: develop ๊ฐœ๋ฐœ๋ฉ”์ธ ๋ธŒ๋žœ์น˜
  • feature: feature/issue1 ๊ธฐ๋Šฅ๊ฐœ๋ฐœ ๋ธŒ๋žœ์น˜

Git flow

  1. ์Šคํ”„๋ฆฐํŠธ ๋งˆ๋‹ค feature๋“ค์„ ์„ ์ • ๋ฐ ์ž‘์„ฑํ•œ๋‹ค.
  2. develop์—์„œ feature๋ฅผ ๋”ฐ์„œ ์ž‘์—…์„ ํ•œ๋‹ค.
  3. ์ž‘์—…์ด ๋๋‚œ feature ๋Š” develop ์œผ๋กœ ๋จธ์ง€๋œ๋‹ค.
  4. ์Šคํ”„๋ฆฐํŠธ ๋‹จ์œ„๋กœ ์ž‘์—…์ด ๋๋‚˜๋ฉด develop ์—์„œ realease๋กœ ๋จธ์ง€๊ฐ€ ๋œ๋‹ค.(๋ฒ„์ „ ๊ด€๋ฆฌ)
  5. release์—์„œ QA ์ด์ƒ์ด ์—†์„ ์‹œ, ํ•ด๋‹น ๋ฒ„์ „์ด master ๋กœ ๋ฐฐํฌ๊ฐ€ ๋œ๋‹ค.(์ด๋•Œ, ๋ณ‘ํ•ฉํ•œ ์ปค๋ฐ‹์— Release ๋ฒ„์ „ ํƒœ๊ทธ๋ฅผ ๋ถ€์—ฌ!)
  6. QA์—์„œ ๋ฒ„๊ทธ ๋ฐœ์ƒ์‹œ hotfix ๋˜๋Š” ๋‹ค์Œ ์Šคํ”„๋ฆฐํŠธ ๊ณ„ํš์œผ๋กœ ์ž‘์—…ํ•œ๋‹ค.

CI/CD

  • CI : feature -> Test -> develop
  • CD : release -> Deploy -> master

git flow ๋ฐ ๋ฒ„์ „ ๊ด€๋ฆฌ ์ฐธ๊ณ  ์ž๋ฃŒ

CI/CD

CI /CD ๋ž€?

"CI"๋Š” ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ์ž๋™ํ™” ํ”„๋กœ์„ธ์Šค์ธ ์ง€์†์ ์ธ ํ†ตํ•ฉ(Continuous Integration)์„ ์˜๋ฏธํ•œ๋‹ค.

CI๋ฅผ ์„ฑ๊ณต์ ์œผ๋กœ ๊ตฌํ˜„ํ•  ๊ฒฝ์šฐ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ๋Œ€ํ•œ ์ƒˆ๋กœ์šด ์ฝ”๋“œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์ด ์ •๊ธฐ์ ์œผ๋กœ ๋นŒ๋“œ ๋ฐ ํ…Œ์ŠคํŠธ๋˜์–ด ๊ณต์œ  ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์— ๋ณ‘ํ•ฉ๋˜๋ฏ€๋กœ ์—ฌ๋Ÿฌ ๋ช…์˜ ๊ฐœ๋ฐœ์ž๊ฐ€ ๋™์‹œ์— ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ฐœ๋ฐœ๊ณผ ๊ด€๋ จ๋œ ์ฝ”๋“œ ์ž‘์—…์„ ํ•  ๊ฒฝ์šฐ ์„œ๋กœ ์ถฉ๋Œํ•  ์ˆ˜ ์žˆ๋Š” ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๋‹ค.

"CD"๋Š” ์ง€์†์ ์ธ ์„œ๋น„์Šค ์ œ๊ณต(Continuous Delivery) ๋ฐ/๋˜๋Š” ์ง€์†์ ์ธ ๋ฐฐํฌ(Continuous Deployment)๋ฅผ ์˜๋ฏธํ•˜๋ฉฐ ์ด ๋‘ ์šฉ์–ด๋Š” ์ƒํ˜ธ ๊ตํ™˜์ ์œผ๋กœ ์‚ฌ์šฉ๋œ๋‹ค.

๋‘ ๊ฐ€์ง€ ์˜๋ฏธ ๋ชจ๋‘ ํŒŒ์ดํ”„๋ผ์ธ์˜ ์ถ”๊ฐ€ ๋‹จ๊ณ„์— ๋Œ€ํ•œ ์ž๋™ํ™”๋ฅผ ๋œปํ•˜์ง€๋งŒ ๋•Œ๋กœ๋Š” ์–ผ๋งˆ๋‚˜ ๋งŽ์€ ์ž๋™ํ™”๊ฐ€ ์ด๋ฃจ์–ด์ง€๊ณ  ์žˆ๋Š”์ง€๋ฅผ ์„ค๋ช…ํ•˜๊ธฐ ์œ„ํ•ด ๋ณ„๋„๋กœ ์‚ฌ์šฉ๋˜๊ธฐ๋„ ํ•œ๋‹ค.

git actions

work flows

Continuous Integration

Continuous Deployment

ํด๋ผ์šฐ๋“œ ์ธ์Šคํ„ด์Šค ๊ตฌ์„ฑ

Clone this wiki locally