60+ CircleCI Interview Questions for Freshers (2027)
62 CircleCI interview questions for freshers with simple answers: config.yml, jobs, steps, executors, workflows, orbs, caches, workspaces, contexts.
CircleCI interviews for freshers check the basics: where the config file lives, what jobs, steps, executors and workflows are, how orbs, caches, workspaces and artifacts differ, and how environment variables and contexts keep secrets out of code. This page has 62 beginner-friendly questions with short answers, then a few next-level and scenario questions.
This is the starter page in our CircleCI series. It explains definitions and simple configs, the level expected from freshers and career changers. When you are comfortable here, move on to the most asked CircleCI interview questions (the main page for this topic) and then the scenario-based CircleCI questions. If you are still choosing which CI tool to learn, read Jenkins vs GitLab CI vs CircleCI.
Key takeaways
- CircleCI reads
.circleci/config.ymlfrom your repository. Config version2.1is needed for orbs, reusable commands, executors and parameters. - A step runs inside a job, a job runs on an executor (Docker, machine, macOS and others), and workflows order the jobs.
- Caches carry data between pipeline runs, workspaces carry data between jobs in one workflow, and artifacts keep files after the workflow ends.
- Secrets belong in project environment variables or contexts, never in the config file.
- Know a few built-in variables (
CIRCLE_BRANCH,CIRCLE_SHA1,CIRCLE_NODE_INDEX) and thecircleciCLI command to validate config.
Core terms on one screen
| Term | Meaning | Config key |
|---|---|---|
| Pipeline | Everything that runs for one trigger (push, schedule, API call) | Whole config |
| Workflow | A set of jobs and the order they run in | workflows |
| Job | A collection of steps run in one fresh environment | jobs |
| Step | One action: checkout, run a command, save a cache | steps |
| Executor | The environment a job runs in | docker, machine, macos |
| Orb | A reusable package of jobs, commands and executors | orbs |
| Context | A shared set of environment variables across projects | context on a workflow job |
A first config to talk through
Interviewers often hand you something like this and ask you to explain it line by line.
version: 2.1
orbs:
node: circleci/node@<version>
jobs:
test:
docker:
- image: cimg/node:lts
steps:
- checkout
- restore_cache:
keys:
- deps-{{ checksum "package-lock.json" }}
- deps-
- run: npm ci
- save_cache:
key: deps-{{ checksum "package-lock.json" }}
paths:
- ~/.npm
- run: npm test
- store_test_results:
path: reports
build:
docker:
- image: cimg/node:lts
steps:
- checkout
- run: npm ci && npm run build
- persist_to_workspace:
root: .
paths:
- dist
workflows:
build-and-test:
jobs:
- test
- build:
requires:
- test
Replace <version> with the current orb version from the CircleCI orb registry. Always pin orb versions.
CircleCI interview questions for freshers
1. What is CircleCI?
CircleCI is a hosted continuous integration and delivery platform. It runs your builds, tests and deployments automatically when code changes, based on a YAML config in your repository.
2. What is continuous integration?
Developers merge small changes often, and each change is built and tested automatically so problems are found within minutes.
3. Where does the CircleCI config file live?
In .circleci/config.yml at the root of the repository.
4. What does version: 2.1 mean?
It is the config version. Version 2.1 enables orbs, reusable commands, reusable executors, parameters and pipeline values.
5. Which version control systems can CircleCI connect to?
CircleCI integrates with GitHub, GitLab and Bitbucket. The connection method (for example the GitHub App or OAuth app) affects some features, so check the integration overview in the docs.
6. What is a pipeline in CircleCI?
The full set of workflows triggered by one event, such as a push to a branch, a schedule or an API call.
7. What is a job?
A collection of steps that run together in a fresh container or virtual machine. Each job starts clean, so data must be passed explicitly.
8. What is a step?
One action inside a job, such as checkout, run, save_cache or store_artifacts.
9. What does the checkout step do?
It checks out your project's source code into the job's working directory. Without it, the job has no code.
10. What does the run step do?
It runs shell commands. You can give it a name, a multi-line command, an environment and a working_directory.
11. What is an executor?
The environment a job runs in. The main types are Docker, machine (a full virtual machine with Linux, Windows or macOS images depending on configuration) and macOS.
12. When do you use the Docker executor?
For most builds and tests. It starts quickly and lets you add service containers such as a database next to the main image.
13. When do you use the machine executor?
When the job needs full VM access: running Docker with special privileges, kernel features, or tools that do not work inside a container.
14. What are CircleCI convenience images?
Prebuilt Docker images maintained by CircleCI under the cimg/ prefix, such as cimg/node, cimg/python and cimg/openjdk, with common CI tools installed.
15. What is a service container?
An extra image listed under the job's docker key after the first one. It runs alongside the primary container, for example PostgreSQL or Redis for integration tests.
16. What is a workflow?
A set of rules for running jobs: which jobs run, in what order, and under which conditions.
17. Do jobs in a workflow run in parallel?
Yes, by default jobs without requires run at the same time. Add requires to make a job wait for others.
18. What does requires do?
It makes a job wait until the listed jobs finish successfully.
19. What is an orb?
A reusable, versioned package of jobs, commands and executors that you import under orbs:, for example the Node or Slack orb.
20. Why pin an orb version?
So a new orb release cannot change your pipeline without a code review. Upgrade deliberately.
21. Where do you find orbs?
In the CircleCI orb registry on circleci.com/developer. Orbs are published by CircleCI, partners and the community.
22. What is a cache in CircleCI?
Saved files, usually dependencies, reused by later pipeline runs to save download and install time.
23. How do cache keys work?
A cache is saved under a key, often built from a checksum of a lockfile: deps-{{ checksum "package-lock.json" }}. When the lockfile changes, the key changes and a new cache is created.
24. Why list more than one key in restore_cache?
CircleCI uses the first key that matches. A shorter fallback key such as deps- restores the most recent older cache when there is no exact match.
25. Can you overwrite an existing cache key?
No. Caches are immutable once saved under a key, so change the key (for example add v2-) to start a new cache.
26. What is a workspace?
Storage that passes files from one job to later jobs in the same workflow, using persist_to_workspace and attach_workspace.
27. What is an artifact?
A file kept after the workflow finishes, such as a test report, log, screenshot or binary, stored with store_artifacts and viewable in the web app.
28. Cache, workspace or artifact: how do you choose?
| Need | Use |
|---|---|
| Reuse dependencies in the next pipeline run | Cache |
| Pass a build output to a deploy job in the same workflow | Workspace |
| Keep a report or binary to download later | Artifact |
29. What does store_test_results do?
It uploads test results (for example JUnit XML) so CircleCI shows failed tests in the UI and can use timing data for test splitting.
30. How do you add a secret like an API key?
Add it as a project environment variable in project settings, or in a context. The job reads it as a normal environment variable.
31. What is a context?
A named set of environment variables at the organisation level, shared by many projects. You attach it to a workflow job with context: my-context.
32. Can contexts be restricted?
Yes. Contexts can be limited to certain groups of users, and CircleCI supports other restrictions such as project or expression rules, so only approved people or branches can run jobs that use production secrets.
33. Name four built-in environment variables.
CIRCLE_BRANCH (branch name), CIRCLE_SHA1 (commit hash), CIRCLE_BUILD_NUM (job number) and CIRCLE_PROJECT_REPONAME (repository name).
34. How do you run a job only on the main branch?
workflows:
deploy:
jobs:
- deploy:
filters:
branches:
only: main
35. What is an approval job?
A workflow job with type: approval. The workflow pauses until someone clicks Approve in the web app, then the dependent jobs run.
36. What is resource_class?
It sets the CPU and memory size of the executor for a job, such as small, medium or large. Bigger classes are faster but use more credits.
37. How do you check that your config is valid before pushing?
Install the CircleCI CLI and run circleci config validate in the project root. circleci config process shows the expanded config with orbs resolved.
38. How do you debug a failing job interactively?
Use "Rerun job with SSH" in the web app. CircleCI keeps the environment running and gives you an SSH command so you can inspect files and run commands.
Questions for 2 to 5 years of experience
39. What are reusable commands?
A commands: block defines a named sequence of steps, optionally with parameters, that any job can call like a step.
commands:
install-deps:
steps:
- restore_cache:
keys: [deps-{{ checksum "package-lock.json" }}]
- run: npm ci
40. What are reusable executors?
An executors: block defines an environment once (image, resource class, environment variables) and jobs reference it with executor: name.
41. What are parameters?
Typed inputs (string, boolean, integer, enum and others) for jobs, commands and executors, and pipeline parameters that can be set when a pipeline is triggered through the API.
42. What is a matrix job?
A workflow feature that runs one job several times with different parameter values, for example testing on several Node.js versions.
43. What is parallelism?
The parallelism key starts several identical executors for one job. Combined with test splitting, each executor runs a slice of the test suite.
44. How does test splitting work?
The CircleCI CLI divides test files between parallel executors. Splitting by timing data from earlier runs keeps executors finishing at about the same time.
go test -v $(go list ./... | circleci tests split --split-by=timings)
45. How do you build Docker images in a Docker executor job?
Add the setup_remote_docker step. It creates a separate remote Docker engine for docker build and docker push commands.
46. What is Docker layer caching?
An option (docker_layer_caching: true on setup_remote_docker or on a machine executor) that reuses unchanged image layers between jobs. It is a paid feature on some plans.
47. What are scheduled pipelines?
Pipelines triggered on a schedule set in project settings or the API. CircleCI recommends schedule triggers over the older scheduled workflows, which are not available for GitHub App or GitLab projects.
48. How do you run a workflow on a Git tag?
Add a tags filter to every job that should run. CircleCI does not run jobs for tags unless a tag filter is set.
- release:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
49. What is the difference between a project environment variable and a context?
Project variables belong to one project. Contexts are shared across projects in an organisation and can be restricted to groups of users.
50. What is OIDC in CircleCI?
CircleCI can issue an OpenID Connect token to a job (available as CIRCLE_OIDC_TOKEN). Cloud providers such as AWS can trust it and issue short-lived credentials, so you do not store long-lived cloud keys.
Senior CircleCI interview questions
51. What is dynamic configuration?
A config with setup: true runs a setup workflow that generates or chooses the real config and continues the pipeline with it, for example to run jobs only for changed folders in a monorepo.
52. What are self-hosted runners?
CircleCI agents you run on your own machines or Kubernetes cluster, for jobs that need private network access, special hardware or data that must stay in your environment.
53. How do you protect production deployments?
Store production secrets in a restricted context, add an approval job before deploy, filter deploys to the main branch or tags, and prefer OIDC over static cloud keys.
54. How do you find slow or flaky tests?
Upload test results with store_test_results and use CircleCI Insights, which reports duration, success rate and flaky tests over time.
Scenario questions for beginners
55. Your pipeline says "config file not found". What do you check?
The path and name: it must be .circleci/config.yml on the branch you pushed, with the folder name starting with a dot.
56. Your job cannot find a file built in a previous job.
Each job starts clean. Persist the file with persist_to_workspace in the first job and use attach_workspace in the second.
57. The cache never seems to restore.
Check that the save and restore keys match, that the paths in save_cache are where dependencies really live, and that the checksum file exists at that point in the job.
58. The deploy job runs on every branch, including feature branches.
Add a branch filter with only: main to the deploy job in the workflow.
59. A job fails with "Too long with no output".
The command printed nothing for longer than the no-output timeout (10 minutes by default). Add progress output or set no_output_timeout on that run step.
60. A teammate committed an API key in the config.
Rotate the key immediately, remove it from the file, store the new key in a project variable or context, and check Git history, since the old key stays there.
61. Tests pass locally but fail in CircleCI.
Compare versions (language, database image), missing environment variables, time zone and file path case. Rerun with SSH to inspect the environment.
62. Builds are slow because npm install runs every time.
Use npm ci with a dependency cache keyed on the lockfile checksum, or use the Node orb's install command, which handles caching.
How freshers should prepare
- Create a free CircleCI account and connect a small GitHub project.
- Write the sample config above from memory, then add a cache, a workspace and an artifact.
- Add a branch filter and an approval job, and explain both out loud.
- Validate your config with the CircleCI CLI before every push.
- Move on to the advanced CircleCI questions and the CircleCI interview preparation guide.
CI/CD concepts carry across tools. Our DevOps training covers pipelines, Docker and Kubernetes with hands-on labs, in the Kharadi, Pune classroom and live online.
FAQ
Is CircleCI good to learn as a fresher?
Yes. Its YAML config is short and readable, and the concepts (jobs, workflows, caching, secrets) transfer directly to GitHub Actions, GitLab CI and Jenkins.
What is the file name of the CircleCI config?
.circleci/config.yml in the repository root.
What is the difference between a job and a workflow?
A job is a set of steps run in one environment. A workflow decides which jobs run and in what order.
What is the difference between cache and workspace?
A cache reuses files across pipeline runs. A workspace passes files between jobs in the same workflow.
Where should secrets go in CircleCI?
In project environment variables or contexts, never in config.yml. Use restricted contexts for production secrets.
How many questions are on this page?
62: 38 fresher questions, 12 for 2 to 5 years of experience, 4 senior questions and 8 beginner scenarios.
Which CircleCI page should I read after this one?
The most asked CircleCI interview questions page, then the scenario-based questions.
Official references
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0