Concept Flow - CI/CD pipeline basics
Code Commit
Build Stage
Test Stage
Deploy Stage
Production Environment
The CI/CD pipeline starts with code commit, then builds the code, runs tests, and finally deploys to production.
git add .
git commit -m "Update"
npm run build
npm test
kubectl apply -f deployment.yaml| Step | Action | Command | Result | Next Step |
|---|---|---|---|---|
| 1 | Code Commit | git add . && git commit -m "Update" | Code saved in repository | Build Stage |
| 2 | Build | npm run build | Project compiled successfully | Test Stage |
| 3 | Test | npm test | All tests passed | Deploy Stage |
| 4 | Deploy | kubectl apply -f deployment.yaml | Application deployed to production | Pipeline Complete |
| 5 | End | - | Pipeline finished successfully | - |
| Variable | Start | After Step 1 | After Step 2 | After Step 3 | After Step 4 | Final |
|---|---|---|---|---|---|---|
| Code State | Local changes | Committed to repo | Built artifacts ready | Tests passed | Deployed to prod | Stable production |
CI/CD pipeline automates code delivery. Steps: Commit code -> Build -> Test -> Deploy. Build compiles code. Tests verify correctness. Deploy sends code to production only if tests pass.