CI/CD (Continuous Integration / Continuous Delivery) là xương sống của quy trình phát triển phần mềm hiện đại. Nếu bạn muốn đọc hiểu Jenkins, GitHub Actions hay GitLab CI config, thì cần nắm vững các thuật ngữ dưới đây. Cùng học nào! ⚡
🔹 Quy trình cơ bản
| English | IPA | Tiếng Việt | Example |
|---|---|---|---|
| pipeline | /ˈpaɪplaɪn/ | đường ống (chuỗi bước tự động) | The pipeline runs unit tests, builds the Docker image, and deploys to staging automatically. |
| build | /bɪld/ | biên dịch / đóng gói | The build step compiles the source code and generates a deployable artifact. |
| test | /tɛst/ | kiểm thử | All test stages must pass before the code can be merged into the main branch. |
| deploy | /dɪˈplɔɪ/ | triển khai | We deploy to the staging environment first, then promote to production after QA approval. |
| artifact | /ˈɑːrtɪfækt/ | sản phẩm đầu ra (file build) | The artifact from the build step is a JAR file stored in our Nexus repository. |
🔹 Điều khiển Pipeline
| English | IPA | Tiếng Việt | Example |
|---|---|---|---|
| stage | /steɪdʒ/ | giai đoạn | Our pipeline has three stages: build, test, and deploy. |
| trigger | /ˈtrɪɡər/ | kích hoạt (sự kiện bắt đầu pipeline) | A push to the main branch will trigger the deployment pipeline automatically. |
| webhook | /ˈwɛbhʊk/ | hook web (callback URL tự động) | Configure a webhook on GitHub to notify Jenkins whenever a new commit is pushed. |
| environment | /ɪnˈvaɪrənmənt/ | môi trường (dev, staging, production) | Deploy to the staging environment first to catch issues before production. |
🔹 Chiến lược triển khai
| English | IPA | Tiếng Việt | Example |
|---|---|---|---|
| rollback | /ˈroʊlbæk/ | quay lại phiên bản trước | We had to rollback to v1.3.2 because the new release caused a critical error. |
| blue-green | /bluː ɡriːn/ | triển khai xanh-xanh (hai môi trường song song) | With blue-green deployment, we switch traffic to the new version instantly. |
| canary | /kəˈnɛri/ | triển khai canary (phát hành từ từ) | Roll out the update as a canary deployment to 5% of users before going full. |
| feature flag | /ˈfiːtʃər flæɡ/ | cờ tính năng (bật/tắt feature) | Use a feature flag to enable the new checkout flow only for beta users. |
💡 Mẹo ghi nhớ
- Pipeline = dây chuyền sản xuất trong nhà máy. Code đi qua từng trạm (stage): build → test → deploy.
- Blue-Green vs Canary: Blue-green = chuyển 100% traffic sang version mới cùng lúc (có thể switch back). Canary = chuyển từ từ (5% → 20% → 100%).
- Feature Flag = công tắc đèn 💡. Bật = user thấy feature mới, tắt = user dùng version cũ. Không cần deploy lại!
📝 Bài tập
Điền từ thích hợp vào chỗ trống:
- The CI/CD ___ automatically builds, tests, and deploys our application.
- When the new version caused errors, we performed a ___ to the previous version.
- Configure a ___ so that GitHub notifies our CI server on every push.
- Use a ___ ___ to gradually roll out the new feature to a small percentage of users first.
- The build step produces an ___ that is stored in the artifact repository.
✅ Đáp án
- pipeline — Đường ống CI/CD tự động hóa toàn bộ quy trình
- rollback — Quay lại phiên bản trước khi có lỗi
- webhook — Hook web để thông báo tự động cho CI server
- canary deployment — Triển khai canary phát hành từ từ cho một phần users
- artifact — Sản phẩm đầu ra từ bước build
Tổng kết
CI/CD không chỉ là tool, mà là văn hóa phát triển phần mềm. Hiểu rõ thuật ngữ giúp bạn cấu hình pipeline, đọc docs, và thảo luận deployment strategy với team một cách chuyên nghiệp. Hãy thử thiết lập một pipeline đơn giản với GitHub Actions để thực hành nhé! 🎯