
CI and CD JOBs – What Exactly It Does in Production
1️⃣ CI job runs when: Developer pushes code to GitHub Pull Request is created Merge happens to main branch CI Job Responsibility = Validate & Package Application CI Job Stages (Real Production Flow) 1️⃣ Checkout Stage Pull latest code from GitHub. checkout scm Purpose: Get source code Ensure correct branch 2️⃣ Code Quality & Security Scan Production CI always includes: SonarQube (code quality) Snyk / Trivy (security scan) Dependency scanning Secret scanning Purpose: Prevent vulnerable code from going to production. 3️⃣ Build Stage Compile application (if needed): Maven (Java) npm build (NodeJS) Python packaging Go build Example: mvn clean package Purpose: Convert source code → runnable artifact 4️⃣ Unit Tests Run automated tests: mvn test If tests fail → pipeline stops. 5️⃣ Build Docker Image docker build -t app:v1 . Now we containerize the app. 6️⃣ Tag Image Properly (Production Best Practice) Use: Git commit SHA Build number Semantic version Example: app:1.0.5 app:build-152 app:commi
Continue reading on Dev.to DevOps
Opens in a new tab



