DevOps.Academy
CoursesCurriculumInterview prepPricing
◔My learningSign in
DevOps.Academy

Free, hands-on DevOps lessons. Made with care in India.

System status

Learn

All coursesLinux roadmapCurriculumInterview questionsCheat sheetsMy learning

Academy

PricingCertificates

Legal

PrivacyTermsContact

devops.rajeev.pro

CI/CD Pipelines · interview practice

CI/CD Pipelines interview questions

Answer each one out loud first, then tap it to check yourself against a model answer and the lesson behind it.

CI/CD concepts 2GitHub Actions basics 3Workflow details 1Secrets & environments 2Testing in pipelines 2Build & publish 2Deploy 2Jenkins 2Other CI tools 2GitOps 2Pipeline security 2Scaling pipelines 3

CI/CD concepts

Q1What does continuous integration change about how a team combines code?junior

Developers integrate small changes into a shared branch frequently, and automated checks run on those changes. That gives the team earlier feedback than waiting for a large integration at the end.

Read the lesson: What a pipeline is for →
Q2How do continuous delivery and continuous deployment differ?junior

Continuous delivery keeps every successful change ready to release, usually with a deliberate approval or release decision. Continuous deployment automatically releases each change that passes the pipeline.

Read the lesson: What a pipeline is for →

GitHub Actions basics

Q3Where does GitHub Actions read workflow definitions from?junior

It reads YAML workflow files from .github/workflows in the repository. A workflow defines when it runs and the jobs and steps that execute for that event.

Read the lesson: GitHub Actions: your first real pipeline →
Q4Two GitHub Actions jobs have no needs relationship. How are they scheduled?junior

They are independent, so GitHub Actions can run them in parallel, subject to available runners and concurrency. I add needs only when a job depends on another job's successful completion or outputs.

Read the lesson: GitHub Actions: your first real pipeline →
Q5A workflow should run only when application code changes. Where do you express that filter?junior

I configure path filters on the triggering event, using paths or paths-ignore for the relevant files. I test the patterns against representative changes so documentation-only updates behave as intended.

Read the lesson: GitHub Actions: your first real pipeline →

Workflow details

Q6What does a matrix strategy do in a workflow?junior

A matrix runs the same job definition across combinations such as several runtime versions or operating systems. It avoids duplicating nearly identical jobs and makes the supported test set explicit.

Read the lesson: Workflow details: expressions, matrices, caches and artifacts →

Secrets & environments

Q7When should a workflow value be a secret rather than a variable?junior

I store credentials or other sensitive values as secrets and ordinary non-sensitive configuration as variables. Neither should be printed into logs, and access should be limited to the workflow that needs it.

Read the lesson: Secrets, environments and OIDC: deploy without leaking keys →
Q8What does a required reviewer on a production environment protect?junior

It pauses a deployment job that targets the environment until an authorized reviewer approves it. The reviewer is a release gate, not a replacement for tests or least-privilege credentials.

Read the lesson: Secrets, environments and OIDC: deploy without leaking keys →

Testing in pipelines

Q9Why do teams usually run lint and unit checks before slower integration tests?junior

Lint and unit checks are usually cheaper and can catch common problems early. Running fast checks first shortens feedback when they fail, while integration tests still verify components together.

Read the lesson: Testing in pipelines: lint, unit, integration and the gate →
Q10What does a line-coverage threshold tell you, and what does it not prove?junior

It reports the share of executable lines exercised by tests and can enforce a minimum such as 80 percent. It does not prove that assertions are meaningful or that important behaviors are tested.

Read the lesson: Testing in pipelines: lint, unit, integration and the gate →

Build & publish

Q11Why copy dependency manifests and install dependencies before copying all application source into a Docker build?mid

Docker can reuse the dependency layer when only application source changes, which makes rebuilds faster. The lockfile and deterministic install command also make the dependency set repeatable in CI.

Read the lesson: Build and publish: images you can trust and find again →
Q12Why should a deployment use an image digest rather than relying only on a mutable tag?mid

A tag can be moved to point at different image content, while a digest identifies the exact image manifest. Deploying by digest makes it possible to know which artifact was tested and released.

Read the lesson: Build and publish: images you can trust and find again →

Deploy

Q13A server deployment extracts a new release but the health check fails. What should the deploy script do?mid

It should not switch traffic to the unhealthy release. I keep the previous release available, report the failed health check and restore the known-good target before treating deployment as complete.

Read the lesson: Deploy: static sites, servers over SSH, Kubernetes, and rollbacks →
Q14Why use a symlink to switch a server to a new release directory?mid

A symlink lets the deploy process prepare a versioned release separately, then change the active target in one step. Keeping the previous target makes rollback straightforward if verification fails.

Read the lesson: Deploy: static sites, servers over SSH, Kubernetes, and rollbacks →

Jenkins

Q15What is the Jenkins controller responsible for, and what do agents do?mid

The controller stores job configuration and coordinates scheduling. Agents provide the worker environments where pipeline steps run, so builds can be isolated and distributed across machines.

Read the lesson: Jenkins: the controller, agents, Jenkinsfile and shared libraries →
Q16Why should Jenkins plugins be treated as part of the production attack surface?mid

Plugins add code and permissions to the controller and can introduce vulnerabilities or compatibility problems. I keep the plugin set small, track advisories, and test controlled updates before production.

Read the lesson: Jenkins: the controller, agents, Jenkinsfile and shared libraries →

Other CI tools

Q17A team has pipelines in GitLab CI, CircleCI and Buildkite. What is worth standardizing across them?mid

The syntax differs, but the team can standardize the stages, test requirements, artifact identity, secret handling and release gates. That makes the workflow understandable without pretending the YAML is interchangeable.

Read the lesson: Other CI tools: GitLab CI, CircleCI and Buildkite →
Q18In GitLab CI, what problem does needs solve compared with waiting for every job in the previous stage?mid

needs lets a job start as soon as its named dependencies finish, rather than waiting for unrelated jobs in the earlier stage. I use it to express the actual dependency graph and shorten critical-path time.

Read the lesson: Other CI tools: GitLab CI, CircleCI and Buildkite →

GitOps

Q19What is the core difference between push-based deployment and GitOps pull-based deployment?mid

In a push model, the pipeline connects to the target and applies a release. In a pull model, an in-cluster controller watches desired state in Git and reconciles the cluster toward it.

Read the lesson: GitOps: Git says what runs, the cluster makes it so →
Q20What does self-heal mean in an Argo CD application?mid

When enabled, Argo CD corrects live changes that drift from the declared desired state in Git. I use it only when Git is the intended source of truth and operators understand how manual changes will be handled.

Read the lesson: GitOps: Git says what runs, the cluster makes it so →

Pipeline security

Q21Why pin a GitHub Action to a full commit SHA instead of a version tag?senior

A tag can be moved, while a full commit SHA identifies immutable action content. Pinning reduces the chance that a later upstream change silently alters the code running with pipeline permissions.

Read the lesson: Pipeline security: your CI is a production system →
Q22Why can interpolating a pull-request title directly into a shell command be dangerous?senior

The title is attacker-controlled text, so inserting it into a run command can turn crafted input into shell syntax. I pass untrusted values through safe environment or action inputs and quote them as data.

Read the lesson: Pipeline security: your CI is a production system →

Scaling pipelines

Q23When would you use a reusable workflow instead of a composite action?senior

I use a reusable workflow to share a job or pipeline structure, including its runner and job-level settings. A composite action is better for packaging a reusable sequence of steps inside a job.

Read the lesson: Scaling pipelines: reuse, your own runners, speed and cost →
Q24What security trade-off should a team review before adopting self-hosted GitHub Actions runners?senior

Self-hosted runners offer control over software and environment but execute workflow code on infrastructure the team must secure. I isolate runners, avoid persistent sensitive state, and do not run untrusted pull-request code on privileged machines.

Read the lesson: Scaling pipelines: reuse, your own runners, speed and cost →
Q25A repository has dozens of nearly identical pipelines. What should you extract first, and what should remain configurable?senior

I extract stable shared behavior into a reusable workflow or composite action and keep project-specific inputs explicit. I preserve clear versioning and permissions so reuse does not hide what each pipeline can do.

Read the lesson: Scaling pipelines: reuse, your own runners, speed and cost →
← Back to the CI/CD Pipelines course