Progressive delivery is an evolution of CI/CD that deploys features gradually, rather than all at once.
Includes:
Feature Flags: Enable/disable features dynamically.
Canary Releases: Test with a small user group first.
A/B Testing: Deploy different versions for analytics.
How do you handle long-running tests in CI/CD pipelines?
Long-running tests slow down deployments. Strategies to optimize:
Parallel Test Execution: Run tests across multiple machines.
Test Selection: Run only impacted tests using test impact analysis.
Mocking Dependencies: Reduce external calls using Mockito, WireMock.
Shift-Left Testing: Run tests early in the pipeline to detect failures faster.
What is Chaos Engineering, and how does it fit into CI/CD?
Chaos Engineering involves intentionally injecting failures to test system resilience.
Example tools:
Gremlin, LitmusChaos (Kubernetes-based).
AWS Fault Injection Simulator (FIS).
In CI/CD Pipelines:
Add a chaos test stage before production deployment.
Example:
steps: - name: Run Chaos Test run: gremlin attack --target kubernetes --cpu 90%
How do you implement immutable deployments in CI/CD?
Immutable deployments mean never modifying running instances—instead, deploying a new version entirely.
Best for containers, serverless, and cloud-native applications.
Tools:
Docker images (image: my-app:v2).
Infrastructure as Code (Terraform, CloudFormation) to replace instances.
Example:
Bad approach:ssh into a server & update the app.
Good approach:Deploy a new container & replace old one.
What are the best practices for securing CI/CD pipelines?
To secure CI/CD, follow these best practices:
✅ Use Secret Management: Store secrets in Vault, AWS Secrets Manager, or Kubernetes Secrets.
✅ Enable Role-Based Access Control (RBAC): Restrict who can trigger deployments.
✅ Enforce Code Signing: Sign artifacts to ensure they are not tampered with.
✅ Run Security Scans: Use SAST, DAST, and dependency scanning tools.
✅ Monitor CI/CD Pipelines: Detect suspicious activity using SIEM tools like Splunk or Datadog.