๐ดโ ๏ธ Bitbucket ์๋ฒฝ ๊ฐ์ด๋: Git ํธ์คํ ๋ถํฐ CI/CD๊น์ง! ๐
“GitHub๋ง ๋ค์ด๋ดค๋๋ฐ Bitbucket์ ๋ญ์ง?”
“Git ๊ด๋ฆฌ๋ฟ๋ง ์๋๋ผ CI/CD๋ ํ ์ ์๋ค๊ณ ?”
๐ Bitbucket์ ๋จ์ํ ์ฝ๋ ์ ์ฅ์๊ฐ ์๋๋ค!
Git ์ ์ฅ์ + CI/CD + ๋ณด์ ๊ฐํ๊น์ง ํฌํจ๋ ์ข ํฉ ๊ฐ๋ฐ ํ๋ซํผ!
์ด๋ฒ ๊ธ์์๋ Bitbucket์ด ๋ฌด์์ธ์ง, ์ฃผ์ ๊ธฐ๋ฅ, GitHub๊ณผ์ ์ฐจ์ด์ , CI/CD ์ค์ ๋ฐฉ๋ฒ๊น์ง ์๋ฒฝ ์ ๋ฆฌํด๋ณด์!
๐ ๋ชฉ์ฐจ
1๏ธโฃ Bitbucket์ด๋? - ๊ฐ๋ ๋ฐ ํน์ง
2๏ธโฃ Bitbucket์ ์ฃผ์ ๊ธฐ๋ฅ
3๏ธโฃ Bitbucket๊ณผ GitHub์ ์ฐจ์ด์
4๏ธโฃ Bitbucket์์ Git ์ ์ฅ์ ์์ฑ ๋ฐ ๊ด๋ฆฌ
5๏ธโฃ Bitbucket Pipelines (CI/CD) ์ค์ ๋ฐฉ๋ฒ
6๏ธโฃ Bitbucket๊ณผ Jira ์ฐ๋
7๏ธโฃ Bitbucket ์ฌ์ฉ ์ฌ๋ก ๋ฐ ์ฅ์
8๏ธโฃ ๊ฒฐ๋ก
1๏ธโฃ Bitbucket์ด๋? - ๊ฐ๋ ๋ฐ ํน์ง ๐ฏ
๐น Bitbucket์ด๋?
Bitbucket์ Atlassian์์ ์ ๊ณตํ๋ Git ์ ์ฅ์ ๊ด๋ฆฌ ์๋น์ค๋ก,
GitHub, GitLab๊ณผ ์ ์ฌํ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ฉด์๋ ํน์ ๊ธฐ๋ฅ์ ๊ฐ์ ์ด ์๋ ๊ฐ๋ฐ์ ํ๋ซํผ์ด๋ค.
๐ Bitbucket์ ์ฃผ์ ํน์ง:
โ Git ์ ์ฅ์ ํธ์คํ (ํด๋ผ์ฐ๋, ์๋ฒ, ๋ฐ์ดํฐ์ผํฐ ์ง์)
โ Bitbucket Pipelines (๋ด์ฅ CI/CD ์ง์)
โ Jira, Trello์ ๊ฐ๋ ฅํ ์ฐ๋
โ ํ๋ผ์ด๋น ์ ์ฅ์ ๋ฌด์ ํ ์ ๊ณต (๋ฌด๋ฃ ํ๋)
โ ์ฌ์ฉ์ ์ ๊ทผ ๊ถํ ๊ด๋ฆฌ ๊ฐํ
๐ก GitHub์ ๊ฐ์ธ/์คํ์์ค ํ๋ก์ ํธ์ ๊ฐ์ ์ด ์๋ค๋ฉด, Bitbucket์ ๊ธฐ์ ๋ฐ ํ์ ํ๋ก์ ํธ์ ๊ฐํ ๋ฉด๋ชจ๋ฅผ ๋ณด์ธ๋ค!
2๏ธโฃ Bitbucket์ ์ฃผ์ ๊ธฐ๋ฅ โ๏ธ
๊ธฐ๋ฅ์ค๋ช
Git ์ ์ฅ์ ํธ์คํ | ์ฝ๋ ์ ์ฅ ๋ฐ ํ์ ์ง์ (Public & Private Repository) |
Bitbucket Pipelines | CI/CD ๊ธฐ๋ฅ ์ ๊ณต (์๋ ๋น๋, ํ ์คํธ, ๋ฐฐํฌ) |
๋ธ๋์น ๊ด๋ฆฌ | Feature Branch, Release Branch ๋ฑ ์ฒด๊ณ์ ์ธ ๋ธ๋์น ์ ๋ต ๊ฐ๋ฅ |
Jira ์ฐ๋ | ์ด์ ํธ๋ํน ๋ฐ ํ๋ก์ ํธ ๊ด๋ฆฌ์ ์๋ฒฝํ ์ฐ๋ |
Pull Request ๋ฐ ์ฝ๋ ๋ฆฌ๋ทฐ | ํ์ ๊ฐ ์ฝ๋ ๋ฆฌ๋ทฐ ๋ฐ ํ์ ๊ฐ๋ฅ |
์น ๊ธฐ๋ฐ ํธ์ง๊ธฐ | ๋ธ๋ผ์ฐ์ ์์ ์ง์ ์ฝ๋ ์์ ๊ฐ๋ฅ |
๋ณด์ ๊ฐํ | ๋ธ๋์น ๊ถํ ์ค์ , IP ํ์ดํธ๋ฆฌ์คํธ, 2FA ์ง์ |
3๏ธโฃ Bitbucket๊ณผ GitHub์ ์ฐจ์ด์ โ๏ธ
๋น๊ต ํญ๋ชฉBitbucketGitHub
์์ ๊ธฐ์ | Atlassian | Microsoft |
ํ๋ผ์ด๋น ์ ์ฅ์ | ๋ฌด๋ฃ (๋ฌด์ ํ) | ๋ฌด๋ฃ (๋ฌด์ ํ) |
CI/CD ๊ธฐ๋ฅ | Bitbucket Pipelines (๋ด์ฅ) | GitHub Actions (๋ด์ฅ) |
Jira ์ฐ๋ | ๊ฐ๋ ฅํ ์ฐ๋ | ๋ณ๋ ์ค์ ํ์ |
์ฝ๋ ๋ฆฌ๋ทฐ | ๋ธ๋์น ๊ถํ ๊ด๋ฆฌ ๊ฐํ | ๊ธฐ๋ณธ Pull Request ๊ธฐ๋ฅ |
๋์ ์ฌ์ฉ์ | ๊ธฐ์ , ํ์ ์ค์ฌ | ์คํ์์ค, ๊ฐ์ธ ํ๋ก์ ํธ |
๐ก GitHub์ ์คํ์์ค ๋ฐ ์คํํธ์ ์ ๊ฐ์ , Bitbucket์ ๊ธฐ์ ๋ฐ ํ ๋จ์ ํ๋ก์ ํธ์ ์ต์ ํ!
4๏ธโฃ Bitbucket์์ Git ์ ์ฅ์ ์์ฑ ๋ฐ ๊ด๋ฆฌ ๐๏ธ
โ 1. Bitbucket ๊ณ์ ์์ฑ ๋ฐ ๋ก๊ทธ์ธ
๐ Bitbucket ๊ณต์ ์ฌ์ดํธ์์ ๋ฌด๋ฃ ๊ณ์ ์์ฑ
โ 2. ์๋ก์ด ์ ์ฅ์ ์์ฑ
1. Repositories → Create repository ํด๋ฆญ
2. ์ ์ฅ์ ์ด๋ฆ ์ ๋ ฅ (e.g., my-bitbucket-project)
3. ์ ์ฅ์ ์ ํ ์ ํ (Public / Private)
4. Git ์ต์ ์ ํ ํ ์์ฑ
โ 3. ๋ก์ปฌ Git๊ณผ ์ฐ๋
# ๋ก์ปฌ ์ ์ฅ์์์ Bitbucket ์๊ฒฉ ์ ์ฅ์ ์ถ๊ฐ
git remote add origin https://bitbucket.org/username/my-bitbucket-project.git
# ๋ณ๊ฒฝ์ฌํญ ์ปค๋ฐ ํ ํธ์
git add .
git commit -m "Initial commit"
git push -u origin main
๐ก GitHub๊ณผ ๋์ผํ Git ๋ช ๋ น์ด ์ฌ์ฉ ๊ฐ๋ฅ!
โ 4. ๋ธ๋์น ์ ๋ต ํ์ฉ
# ์๋ก์ด ๋ธ๋์น ์์ฑ ๋ฐ ์ ํ
git checkout -b feature/new-feature
# ๋ณ๊ฒฝ ์ฌํญ ์ปค๋ฐ ํ ์๊ฒฉ ์ ์ฅ์์ ํธ์
git push origin feature/new-feature
๐ก Bitbucket์์๋ ๋ธ๋์น ๊ถํ ๊ด๋ฆฌ๊ฐ ๊ฐ๋ฅํ์ฌ, ํ์ ํ๊ฒฝ์์ ๋์ฑ ์์ ํ๊ฒ ์ฝ๋ ๊ด๋ฆฌ ๊ฐ๋ฅ!
5๏ธโฃ Bitbucket Pipelines (CI/CD) ์ค์ ๋ฐฉ๋ฒ ๐
๐น Bitbucket Pipelines๋?
Bitbucket ์์ฒด์ ์ผ๋ก ์ ๊ณตํ๋ CI/CD ๋๊ตฌ๋ก,
๋ฐฐํฌ ์๋ํ ๋ฐ ํ ์คํธ ํ๊ฒฝ์ ์ฝ๊ฒ ๊ตฌ์ถํ ์ ์๋ค!
GitHub Actions์ ์ ์ฌํ์ง๋ง, Jira์์ ์ฐ๋์ด ๋ ๊ฐ๋ ฅํ ๊ฒ์ด ์ฅ์ .
โ 1. Bitbucket Pipelines ํ์ฑํ
1. ์ ์ฅ์ ์ค์ → Pipelines ํ์ฑํ
2. bitbucket-pipelines.yml ํ์ผ ์์ฑ
โ 2. ๊ธฐ๋ณธ Pipeline ์ค์
image: node:16 # ์คํ ํ๊ฒฝ ์ง์
pipelines:
default:
- step:
name: "Install Dependencies"
caches:
- node
script:
- npm install
branches:
main:
- step:
name: "Run Tests"
script:
- npm test
๐ก ์ด๋ ๊ฒ ํ๋ฉด ์ฝ๋ ํธ์ ์ ์๋์ผ๋ก ํ ์คํธ ์คํ ๊ฐ๋ฅ!
โ 3. CI/CD๋ฅผ ํตํ ์๋ ๋ฐฐํฌ
pipelines:
branches:
main:
- step:
name: "Deploy to Production"
script:
- npm run build
- scp -r ./dist user@server:/var/www/html
๐ก ์ฝ๋๊ฐ main ๋ธ๋์น์ ํธ์๋๋ฉด ์๋์ผ๋ก ๋ฐฐํฌ ์งํ!
6๏ธโฃ Bitbucket๊ณผ Jira ์ฐ๋ ๐
Bitbucket์ Jira์์ ๊ฐ๋ ฅํ ์ฐ๋ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ค.
โ Jira ์ด์ ํธ๋ํน ์ฐ๋
1. Bitbucket → Repository Settings → Jira Integration
2. Jira ํ๋ก์ ํธ์ ์ฐ๊ฒฐ
3. Commit ๋ฉ์์ง์ Jira ์ด์ ID ์ถ๊ฐ
git commit -m "JIRA-123: Fix login bug"
๐ก Jira ์ด์์ Git ์ปค๋ฐ์ ์๋์ผ๋ก ์ฐ๊ฒฐํ์ฌ ์ด์ ๊ด๋ฆฌ ๊ฐ๋ฅ!
โ Pull Request์์ Jira ์ด์ ํ์ธ
Pull Request์์ ์๋์ผ๋ก ๊ด๋ จ Jira ์ด์๋ฅผ ํ์ํด์ค์,
๊ฐ๋ฐ ์งํ ์ํฉ์ ํ๋์ ํ์ ๊ฐ๋ฅ!
7๏ธโฃ Bitbucket ์ฌ์ฉ ์ฌ๋ก ๋ฐ ์ฅ์ ๐ฏ
โ ์คํํธ์ , ์๊ท๋ชจ ํ์์ Git ๊ด๋ฆฌ ๋ฐ ๋ฐฐํฌ ์๋ํ
โ ๊ธฐ์ ํ๊ฒฝ์์ Jira์ ํตํฉํ์ฌ ํ์ ๊ฐํ
โ CI/CD๋ฅผ ๊ฐํธํ๊ฒ ์ค์ ํ์ฌ ์๋ ๋ฐฐํฌ ํ๊ฒฝ ๊ตฌ์ถ
โ GitHub ๋๋น ๋ณด์์ด ๊ฐํ๋ ์ฝ๋ ์ ์ฅ์ ์ด์ ๊ฐ๋ฅ
๐ก ํนํ ๊ธฐ์ ํ๊ฒฝ์์ GitHub ๋์ Bitbucket์ ์ ํธํ๋ ๊ฒฝ์ฐ๊ฐ ๋ง๋ค!
8๏ธโฃ ๊ฒฐ๋ก : Bitbucket, ์ธ์ ์ฌ์ฉํด์ผ ํ ๊น? ๐ค
โ GitHub๋ณด๋ค ๋ณด์๊ณผ ๊ถํ ๊ด๋ฆฌ๊ฐ ํ์ํ ๊ฒฝ์ฐ
โ Jira, Trello ๋ฑ Atlassian ์ ํ๊ณผ ๊ฐ๋ ฅํ ์ฐ๋์ด ํ์ํ ๋
โ CI/CD (Bitbucket Pipelines)๋ฅผ ํ์ฉํ ์๋ํ ํ๊ฒฝ์ ๊ตฌ์ถํ๊ณ ์ถ์ ๋
โ ๊ธฐ์ ๋ฐ ํ์ ์ค์ฌ์ Git ์ ์ฅ์๋ฅผ ์ฐพ๊ณ ์์ ๋
๐ฅ “GitHub, GitLab๋ง ์๊ณ ์์๋ค๋ฉด, Bitbucket๋ ๊ณ ๋ คํด๋ณด์!”
๐ ์ ์ค์ ๊ฐ๋ฐ์๊ฐ ๋์ด๋ด ์๋น! ๐ท
'Dev-ops' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๐ข ์ฟ ๋ฒ๋คํฐ์ค(Kubernetes) ๊ตฌ์กฐ ์๋ฒฝ ๊ฐ์ด๋ โ (0) | 2025.04.02 |
---|---|
๐จ Sentry ์๋ฒฝ ๊ฐ์ด (0) | 2025.04.01 |
๐ Heroku ์๋ฒฝ ๊ฐ์ด๋ (0) | 2025.03.30 |
๐ GCP (Google Cloud Platform) (0) | 2025.03.29 |
๐ GitLab ์๋ฒฝ ๊ฐ์ด๋ (0) | 2025.03.28 |