Skip to content

Portal | Level: L1: Foundations | Topics: CI/CD | Domain: DevOps & Tooling

CI/CD Drills

10 drills for CI pipeline and security scanning operations. Each takes 1-5 minutes.

Difficulty: [E] Easy (recall) | [I] Intermediate (combine flags/tools) | [H] Hard (multi-step debugging)

Remember: The CI pipeline order matters: Lint (cheapest, fastest) -> Test (catch logic errors) -> Build (compile/image) -> Scan (vulnerabilities) -> Deploy (most expensive). Fail fast: put the quickest checks first so broken code never reaches the slow steps. Mnemonic: "LTBSD" — Lint, Test, Build, Scan, Deploy.

Gotcha: trivy image scans the image filesystem for OS and library CVEs, but it does NOT catch misconfigurations in your Dockerfile. Use trivy config Dockerfile separately to catch things like running as root, hardcoded secrets, or missing health checks.

Debug clue: If helm template | kubectl apply --dry-run=client passes but the actual deploy fails, the issue is likely runtime — missing secrets, unavailable images, or resource quota exhaustion. --dry-run=client only validates schema, not cluster state.


Drill 1: Run Trivy scan [I]

Question: Scan the grokdevops Docker image for CRITICAL and HIGH vulnerabilities.

# Your command here
Relevant lab: training/interactive/runtime-labs/lab-runtime-06-trivy-fail-to-green/ Answer: answers/ci_answers.md


Drill 2: Lint the Helm chart [E]

Question: Validate the grokdevops Helm chart for template errors.

# Your command here
Answer: answers/ci_answers.md


Drill 3: Run unit tests [E]

Question: Run the Python test suite for the grokdevops application.

# Your command here
Answer: answers/ci_answers.md


Drill 4: Build the Docker image [E]

Question: Build the grokdevops Docker image with a test tag.

# Your command here
Answer: answers/ci_answers.md


Drill 5: Validate Terraform [I]

Question: Check Terraform configuration for syntax errors and formatting issues.

# Your command here
Answer: answers/ci_answers.md


Drill 6: Check CI workflow [E]

Question: Find the GitHub Actions CI workflow file and list which jobs it runs.

# Your command here
Answer: answers/ci_answers.md


Drill 7: Scan for specific CVE [I]

Question: Check if the grokdevops image is affected by a specific CVE (e.g., CVE-2023-44487).

# Your command here
Answer: answers/ci_answers.md


Drill 8: Validate Kubernetes manifests [I]

Question: Validate all Helm-generated Kubernetes manifests against the K8s schema.

# Your command here
Answer: answers/ci_answers.md


Drill 9: Check image base [E]

Question: Determine the base image used in the grokdevops Dockerfile.

# Your command here
Answer: answers/ci_answers.md


Drill 10: Run the full CI pipeline locally [H]

Question: Run all CI checks (lint, test, build, scan) in sequence locally.

# Your command here
Answer: answers/ci_answers.md


Wiki Navigation