CI/CD
Pipelines, artifacts, deployment strategies, rollback, and automation.
What is the difference between continuous delivery and continuous deployment?
Continuous delivery keeps releases ready for production, while continuous deployment pushes every validated change automatically.
What are the common stages in a CI/CD pipeline?
Typical stages include build, test, security checks, package, and deploy.
What is the difference between blue-green and canary deployment?
Blue-green switches traffic between two full environments, while canary gradually shifts traffic to a new version.
What is an artifact in CI/CD?
An artifact is a build output produced by a pipeline stage and used later.
What is a rollback in deployment workflows?
A rollback returns an application or infrastructure to a previously known good version.
What is an immutable deployment?
An immutable deployment replaces old components with new ones instead of modifying them in place.
What should you do if a deployment fails?
Rollback, analyze logs, fix the issue, and redeploy.
How should secrets be handled in CI/CD pipelines?
Use secure secret storage and never hardcode secrets in code or configs.
Why use parallel jobs in CI/CD?
Parallel jobs reduce pipeline execution time.
What is Continuous Integration?
Continuous Integration is the practice of automatically building and testing code changes frequently.
What is Continuous Delivery?
Continuous Delivery keeps software in a releasable state through automated pipelines.
What is a CI/CD pipeline?
A CI/CD pipeline is an automated workflow that builds, tests, and deploys software.
Why is automation important in CI/CD?
Automation reduces human error and makes releases faster and more repeatable.
What happens in the build stage of a pipeline?
The build stage compiles code or packages the application into a deployable artifact.
Why is the test stage important in CI/CD?
It validates that code changes do not break expected behavior.
What is linting in a CI/CD pipeline?
Linting checks code style, syntax, and common mistakes automatically.
What is the difference between unit tests and integration tests?
Unit tests check isolated components, while integration tests verify how components work together.
What is an artifact repository?
An artifact repository stores build outputs such as packages, binaries, or images.
Why is a container registry used in CI/CD?
A container registry stores and distributes built container images.
Why does branch strategy matter in CI/CD?
Branch strategy affects how changes are validated, merged, and released.
What is trunk-based development?
Trunk-based development is a workflow where developers integrate changes into the main branch frequently.
How should feature branch pipelines differ from main branch pipelines?
Feature branch pipelines usually validate changes, while main branch pipelines often prepare releases and deployments.
When should manual approval be used in a pipeline?
Manual approval is useful before risky or production-impacting steps.
Why do pipelines often deploy to multiple environments?
Multiple environments help validate changes progressively before production.
What is a staging environment?
Staging is a pre-production environment used to validate releases before production.
What is a smoke test in CI/CD?
A smoke test is a quick check that verifies the application starts and basic functionality works.
Why use canary deployment in CI/CD?
Canary deployment reduces risk by exposing a new version to a small portion of traffic first.
Why use blue-green deployment?
Blue-green deployment makes releases safer by switching traffic between two environments.
Why should artifacts be immutable in CI/CD?
Immutable artifacts ensure the same tested build is the one that gets deployed.
Why is versioning important in CI/CD?
Versioning makes artifacts traceable and helps with rollback and debugging.
What should a pipeline do when tests fail?
It should stop the workflow and prevent broken changes from moving forward.
What are flaky tests and why are they dangerous in CI/CD?
Flaky tests are unstable tests that pass or fail inconsistently, reducing trust in the pipeline.
Why is caching used in CI/CD pipelines?
Caching speeds up pipelines by reusing dependencies or previous build layers.
What is a runner or agent in CI/CD systems?
A runner or agent is the worker that actually executes pipeline jobs.
What is the difference between self-hosted and managed CI/CD runners?
Managed runners are maintained by the platform provider, while self-hosted runners are managed by your team.
How can pipelines accidentally leak secrets?
Secrets can leak through logs, misconfigured environment variables, or insecure files.
Why add policy checks to CI/CD pipelines?
Policy checks enforce security, compliance, and operational standards automatically.
What is progressive delivery?
Progressive delivery releases software gradually while monitoring behavior and controlling exposure.
What is GitOps in the context of CI/CD?
GitOps uses Git as the source of truth for infrastructure and deployment state.
Why is observability important after deployment?
Observability helps detect whether a release is healthy in real environments.
How do you choose a deployment strategy in CI/CD?
The choice depends on risk tolerance, system design, rollback needs, and operational maturity.
Why are database migrations a special concern in CI/CD?
Database changes can be hard to roll back and may impact live data or compatibility.