CI/CD & GitOps
Everything between a merged commit and running software: build pipelines on the major CI platforms, GitOps reconciliation into Kubernetes, release-management tools, and static hosting. Interviewers ask because delivery mechanics decide how often a team can ship and how fast it can undo a bad change.
on this pageshowhide
explore
- GitHub Actions (has its own guide)32 questions
- Workflow Syntax & Triggers6 questions
- Jobs & Steps6 questions
- Runners4 questions
- Actions & Marketplace4 questions
- Secrets & Environments6 questions
- Caching & Matrix Builds6 questions
- GitLab CI (has its own guide)30 questions
- Pipeline YAML & Rules6 questions
- Runners & Executors6 questions
- Environments & Review Apps6 questions
- Includes, Templates & Components6 questions
- Variables & Secrets6 questions
- Jenkins (has its own guide)32 questions
- Pipeline Syntax5 questions
- Stages & Flow Control5 questions
- Agents & Distributed Builds6 questions
- Plugins & Ecosystem5 questions
- Credentials & Security5 questions
- Shared Libraries6 questions
- CircleCI4 questions
- TeamCity4 questions
- Azure DevOps17 questions
- Pipelines: YAML & Templates5 questions
- Deployment: Environments & Approvals6 questions
- Artifacts & Package Feeds6 questions
- ArgoCD16 questions
- Applications & Sync6 questions
- Health Assessment & Hooks5 questions
- Projects & RBAC5 questions
- FluxCD12 questions
- Controllers & Kustomizations6 questions
- Image Update Automation6 questions
- Octopus Deploy4 questions
- Kamal4 questions
- GitHub Pages4 questions
- CI/CD Concepts52 questions
- Pipeline Anatomy & Triggers5 questions
- Runners, Agents & Isolation5 questions
- Artifacts & Promotion5 questions
- Deployment Strategies4 questions
- Environments, Gates & Approvals5 questions
- Secrets in CI & OIDC Federation6 questions
- Caching & Build Optimization5 questions
- Pipeline & Supply-Chain Security6 questions
- Monorepo Pipelines6 questions
- Release Versioning & Automation5 questions
- GitOps20 questions
- Reconciliation & Desired State5 questions
- Pull vs Push Delivery5 questions
- Repo Structure & Promotion5 questions
- Composition & Multi-Cluster5 questions
→ has its own guide
- Android Developerrole
- Backend Developerrole
- Data Engineerrole
- DevOps / SRE Engineerrole
- DevSecOps Engineerrole
- Forward Deployed Engineerrole
- Frontend Developerrole
- Full Stack Developerrole
- Git & GitHubskill
- GitHub Actionsskill
- GitLab CI/CDskill
- Java Backend Developerrole
- Java SDETrole
- Jenkinsskill
- Kotlin Backend Developerrole
- Kubernetesskill
- MLOps Engineerrole
- Network Engineerrole
- QA Engineerrole
- Software Architectrole
- iOS Developerrole
questions
231 · 13 sectionsIn a GitHub Actions step, what does uses: reference, and what forms can that reference take?
basics
~10 suses: runs a packaged action instead of a shell command. It points at a public repository plus a ref (actions/checkout@v4), a path inside your own repository (./.github/actions/setup), or a Docker image (docker://alpine:3.19).
In a GitHub Actions workflow step, what is the difference between uses: and run:?
basics
~20 sA step either invokes packaged code with uses:, which points at an action by repository, local path, or Docker image and takes inputs via with:, or executes shell commands with run:. One step cannot have both keys.
In GitHub Actions, what does runs-on select, and what is a hosted ubuntu-latest runner?
basics
~10 sruns-on picks the machine a GitHub Actions job executes on, by label. ubuntu-latest requests a GitHub-hosted Linux virtual machine that is created fresh for that one job and destroyed when the job finishes.
In GitHub Actions, how do you pass a repository secret into a step safely?
basics
~20 sReference it through the secrets context, as ${{ secrets.NAME }}, and map it into an env variable or an action input instead of splicing it into a shell command. GitHub masks the value in logs, but masking is redaction, not access control.
In GitHub Actions, how do branches: and tags: filters on push behave?
basics
~20 sThey are independent allow-lists over the pushed ref. A branches filter alone means tag pushes never trigger the workflow, and a tags filter alone means branch pushes never do; declaring both matches either. Patterns are globs, not regexes.
In a GitLab CI job, what does the `environment:` keyword do, and what do its `name` and `url` fields control?
basics
~20 sThe environment: keyword marks a GitLab CI job as a deployment, so GitLab records what is deployed where. The name identifies the tracked environment; the url is the address GitLab links to from that environment, the job, and the merge request.
In a GitLab CI .gitlab-ci.yml, what does the include: keyword pull in, and how do its local, project, remote and template forms differ?
basics
~20 sGitLab CI's include merges other YAML configuration into your pipeline when the pipeline is created. local reads a file from the same repository and commit, project a file from another project on the same instance, remote a publicly reachable URL, and template a file GitLab ships with the instance.
In GitLab CI, how do you pass a file produced by one job to a job in a later stage, and what controls which artifacts a job downloads?
basics
~10 sDeclare the file under artifacts:paths in the producing job; GitLab uploads it and later-stage jobs download artifacts from all earlier-stage jobs automatically. Narrow that with dependencies: (an empty list downloads nothing) or with needs:.
In GitLab CI, how does a job's `tags:` keyword decide which runner picks the job up, and why can a job sit pending forever?
basics
~20 sA GitLab CI job runs only on a runner that carries every tag listed in its tags: keyword. If no online, permitted runner has all of them, the job stays pending until such a runner appears or GitLab drops it as stuck.
In GitLab CI, how do you give every merge request its own review app environment, and where does the environment name come from?
basics
~20 sPut a CI/CD variable in the environment name so each branch creates its own environment — typically name: review/$CI_COMMIT_REF_SLUG with a matching url. GitLab expands the variable per pipeline, so every merge request gets a separately tracked deployment and a View app link.
In a declarative Jenkinsfile, what is the difference between `agent any` at the top of the pipeline and `agent none`, and what must each stage do when the top-level directive is `agent none`?
basics
~20 sagent any lets Jenkins run the whole pipeline on any available executor, allocating one workspace for the entire run. agent none allocates no executor at pipeline level, so every stage must declare its own agent block.
In a Jenkins Pipeline, what does the withCredentials step do, and how should a bound secret be referenced inside a sh step?
basics
~20 swithCredentials fetches a stored credential by its ID and exposes it as an environment variable only inside its block, masking the value in the console log. Inside sh, reference it with single quotes so Groovy never interpolates the secret.
In a Jenkins declarative Jenkinsfile, which blocks are mandatory, and where do the actual build commands go?
basics
~20 sA declarative Jenkinsfile is one pipeline block that must contain an agent directive and a stages block. Inside stages, every stage needs a name and a steps block, and the actual commands live in steps. Everything else is optional.
In Jenkins, what is a plugin, and what does the Plugin Manager actually do when you install one?
basics
~20 sA Jenkins plugin is a packaged extension (.hpi/.jpi) supplying almost everything Jenkins does beyond scheduling builds. The Plugin Manager downloads it plus its declared dependencies into JENKINS_HOME/plugins and loads it, in many cases only after a restart.
In a CircleCI .circleci/config.yml, what is an orb, and what kinds of reusable elements can a single orb contain?
basics
~10 sAn orb is a versioned, shareable package of CircleCI configuration published to a registry and pulled in under the orbs: key. One orb can supply three element types: commands, jobs, and executors.
A CircleCI job that uses the docker executor runs docker build and fails because no Docker daemon is reachable. Why does that happen, and what are your two options?
basics
~20 sThe docker executor runs steps inside a container that has no Docker daemon of its own. Add the setup_remote_docker step to attach an isolated remote Docker environment, or switch the job to the machine executor, a VM with a local daemon.
In a CircleCI workflow, a downstream job cannot find the build output an earlier job produced. How do CircleCI's workspaces, caches, and artifacts differ, and which one should carry that output?
basics
~20 sEvery CircleCI job starts on a clean executor, so nothing carries over implicitly. Workspaces move files between jobs in one workflow run and are the right tool here; caches speed up refetching dependencies; artifacts are outputs stored for people to download.
In a CircleCI config, what is the practical difference between referencing an orb as circleci/[email protected], circleci/node@5, and circleci/node@volatile?
basics
~20 sThe full pin @5.0.2 always resolves to one immutable published version. @5 resolves to the newest release in that major line each time the config compiles, and @volatile takes the most recent publish. Only the full pin is reproducible.
In a TeamCity build chain, how does a snapshot dependency differ from an artifact dependency between two build configurations?
basics
~20 sA snapshot dependency orders the builds and pins them to one source revision, forming the chain. An artifact dependency copies files produced by the upstream build into the downstream one. They are independent settings, and most real chains declare both between the same pair.
In TeamCity, what is the Kotlin DSL, and how does a .teamcity/settings.kts file in your repository become the server's build configuration?
basics
~20 sTeamCity's Kotlin DSL describes projects and build configurations as compiled Kotlin code in .teamcity/settings.kts. Enabling Versioned Settings on a project makes the server fetch that file from VCS, compile it, and apply the result as the project's live settings.
A TeamCity build sits in the queue reporting that no compatible agents can run it. How do you diagnose and fix it?
basics
~20 sOpen the build configuration's agents view, which lists compatible and incompatible agents with the exact unmet requirement for each. Fix the mismatch, or check the pool: agents in a pool not associated with the project can never run its builds however well they match.
Your team is choosing between defining TeamCity pipelines in its Kotlin DSL and using a YAML-based CI configuration. What does the typed, compiled definition buy, and what does it cost?
basics
~20 sA typed DSL catches configuration mistakes at compile time, offers IDE completion and safe refactoring, and lets one function generate many near-identical pipelines. It costs a compile step, coupling to the server's API version, and a configuration only JVM engineers can comfortably read and review.
What is a feed in Azure Artifacts, and which package types can a single feed host?
basics
~20 sAn Azure Artifacts feed is a private package registry hosted inside an Azure DevOps organization or project. One feed can hold NuGet, npm, Maven, Python and Universal Packages together, each reached through its own protocol endpoint URL.
In an azure-pipelines.yml file, how do stages, jobs and steps nest, and which of the three is the unit that gets an agent?
basics
~10 sStages contain jobs and jobs contain steps. The job is the unit of agent allocation: one agent runs all of a job's steps in one workspace, so two separate jobs share no filesystem.
An Azure Pipelines job fails with 401 Unauthorized while restoring from an Azure Artifacts feed in the same organization. How does a pipeline authenticate to a feed, and what would you check?
basics
~20 sA pipeline authenticates as its build service identity, and an authentication task injects that identity's token into the package client's config. A 401 usually means the build service identity holds no role on the feed, or the job's authorization scope cannot reach a feed in another project.
In an Azure Pipelines YAML pipeline, what does declaring a job as `deployment:` with an `environment:` give you that a plain `job:` does not?
basics
~20 sA deployment job targets a named environment, so Azure Pipelines records deployment history against it, enforces that environment's approvals and checks before the stage runs, and lets you choose a runOnce, rolling or canary strategy.
Azure Pipelines YAML has three expression syntaxes — ${{ }}, $[ ] and $( ). When is each evaluated, and what breaks if you pick the wrong one?
basics
~20 sThree different times. ${{ }} is a template expression evaluated at compile time before the run is scheduled, $[ ] is a runtime expression evaluated when the stage or job starts, and $( ) is macro syntax substituted just before each task executes.
In Argo CD, what does an Application resource declare, and what do its spec.source fields (repoURL, path, targetRevision) and spec.destination fields each specify?
basics
~20 sAn Argo CD Application is a Kubernetes custom resource that pairs one desired-state source with one cluster destination. spec.source gives the Git repoURL, the path inside it, and the targetRevision to read; spec.destination gives the cluster and namespace to deploy into.
In Argo CD, an Application reports both a sync status and a health status. What does each one tell you, and what values can each take?
basics
~20 sArgo CD tracks two independent axes. Sync status compares live cluster objects with the manifests at the target Git revision (Synced, OutOfSync). Health status judges whether those objects actually work (Healthy, Progressing, Degraded, Suspended, Missing, Unknown).
In Argo CD, what does an AppProject constrain, and what does the built-in project named default permit out of the box?
basics
~20 sAn Argo CD AppProject is a tenancy boundary. It lists which Git repositories its Applications may deploy from, which destination clusters and namespaces they may deploy to, and which resource kinds they may create. The built-in default project allows all of those.
In an Argo CD Application's spec.syncPolicy.automated block, what do prune: true and selfHeal: true each change, and what happens when each of them is left off?
basics
~20 sprune lets automated sync delete live resources that were removed from Git; selfHeal lets it re-apply Git over changes made directly in the cluster. With both off, automated sync only applies new Git revisions and reports everything else as OutOfSync without touching it.
In Argo CD, what are resource hooks, which phases can you attach one to, and how would you use them to run a database migration before a new version rolls out?
basics
~20 sArgo CD resource hooks are ordinary Kubernetes manifests annotated with argocd.argoproj.io/hook so they run at a chosen point of a sync: PreSync, Sync, PostSync or SyncFail. A schema migration is a Job annotated PreSync, so the sync stops if it fails.
In Flux CD, which three custom resources make up image update automation, and what does each one contribute?
basics
~20 sFlux splits image automation across three objects: ImageRepository scans a container registry and lists its tags, ImagePolicy selects the newest tag matching a rule, and ImageUpdateAutomation writes that tag back into the Git manifests Flux deploys from.
In Flux v2, how do source-controller and kustomize-controller divide the work of getting manifests from a Git repository onto a cluster, and what does each resource own?
basics
~10 sFlux splits fetching from applying. source-controller pulls a repository (GitRepository, OCIRepository, HelmRepository) and publishes a verified artifact; kustomize-controller takes that artifact, builds the manifests and applies them to the cluster on its own interval.
In a Flux ImageUpdateAutomation, how does the controller know which lines of a YAML manifest to rewrite when a new image tag is selected?
basics
~20 sYou mark the target lines yourself. Flux's Setters strategy only rewrites a YAML value carrying an inline comment that names an ImagePolicy, such as # {"$imagepolicy": "flux-system:app"}. Unmarked files under the update path are left untouched.
You pushed a commit to the repository Flux watches and nothing changed on the cluster. How do you work out where delivery stopped, using the flux CLI and the resource statuses?
basics
~20 sWork outward from the source. Check the GitRepository's Ready condition and the revision it fetched, then the Kustomization's condition, revision and suspend state. A failed fetch, a stale artifact, a build error, an unmet dependency or a long interval each stop delivery at a different, visible point.
In a Flux v2 Kustomization resource, what do the interval and prune fields control, and what happens if prune is left false?
basics
~20 sinterval sets how often kustomize-controller rebuilds and re-applies the manifests even when Git has not changed, which is what corrects drift. prune: true lets Flux delete cluster objects it previously applied once they disappear from the source.
In Octopus Deploy, what is the difference between a release and a deployment, and what does it mean to promote a release?
basics
~20 sIn Octopus Deploy a release is an immutable, versioned snapshot of a project's deployment process, variables and chosen package versions. A deployment executes that release into one environment; promoting means deploying the same release to the next environment.
In Octopus Deploy, what does a Lifecycle control, and how do its phases decide which environment a release may go to next?
basics
~20 sAn Octopus Deploy lifecycle defines the ordered phases of environments a release must travel through. Each phase lists environments and how many must deploy successfully before the next phase unlocks, so Production stays unreachable until earlier phases pass.
You changed a project variable in Octopus Deploy, then redeployed an existing release to Production, but the old value was still used. Why, and what are your options?
basics
~20 sOctopus Deploy snapshots a project's variables when the release is created, so later edits do not reach existing releases. Either use Update Variables on that release to refresh its variable snapshot, or create a new release.
What is a runbook in Octopus Deploy, and when would you use one instead of adding a step to the project's deployment process?
basics
~20 sAn Octopus Deploy runbook is a separate operational process that runs against an environment's targets without creating a release or shipping an artifact. Use one for routine operations — restarts, cert rotation, restores — that must not wait for a deployment.
In a Kamal deploy, how does the new container take over traffic from the one already running without dropping requests?
basics
~20 sKamal boots the new container alongside the old one, waits for its healthcheck endpoint to pass, and only then tells its proxy to switch traffic over, draining in-flight requests from the old container before stopping it. A container that never reports healthy never receives traffic.
A Kamal deploy has shipped a bad release. What does `kamal rollback` actually do, and in which situations will it not save you?
basics
~20 skamal rollback takes a previous version tag, brings that container back up on each host, and switches the proxy to it — no rebuild, no registry round trip, so it is fast. It restores only the app container: not the database, not accessories, and not host state.
Your team runs a handful of services on a few VMs and is debating whether to adopt Kubernetes. Make the case for deploying with Kamal instead, and be explicit about what you give up.
basics
~20 sKamal fits when your capacity is known, your service count is small, and nobody is paid to run a control plane: you get zero-downtime container deploys over SSH for one config file. You give up scheduling, autoscaling, rescheduling on host failure, and continuous reconciliation of drift.
What does Kamal need on a target server before it can deploy your app there, and how does the container image actually get onto that host?
basics
~20 sKamal needs only an SSH login that can run Docker on the host — no agent and no control plane. It builds your image, pushes it to a container registry, then drives docker commands over SSH so each server pulls and runs it.
In GitHub Pages, what are the two publishing sources for a site, and how does each one get files onto the live site?
basics
~20 sGitHub Pages publishes either from a branch — it serves a chosen branch and folder, running Jekyll over it first — or from GitHub Actions, where a workflow uploads a built directory as a Pages artifact and a deploy step publishes that artifact.
A prebuilt static site is published from a GitHub Pages branch, and every asset under an _assets folder returns 404 on the live site. What is causing it, and what fixes it?
basics
~20 sA branch publishing source is run through GitHub's built-in Jekyll processor, which skips files and folders whose names begin with an underscore, so they never reach the served site. Committing an empty .nojekyll file at the publishing source's root disables that processing.
A team proposes moving an application onto GitHub Pages. What can GitHub Pages fundamentally not do, and how would you decide whether that rules it out?
basics
~20 sGitHub Pages serves static files and runs no code at request time: no API endpoints, no server-side rendering, no database, no server-held secrets, no configurable response headers or redirects, and no access control on the published site. That fits docs and marketing sites, not applications.
How do you put a GitHub Pages site on a custom apex domain with HTTPS, and what DNS records and safeguards does that involve?
basics
~20 sPoint the apex at GitHub's documented Pages A and AAAA addresses (or an ALIAS record to <owner>.github.io), set the domain in the repository's Pages settings, wait for GitHub to provision a Let's Encrypt certificate, then enable Enforce HTTPS. Verify the domain to block takeover.
A CI/CD pipeline builds the application from source separately for the dev, staging and production deployments. What does the "build once, deploy many" principle say to do instead, and what risk does rebuilding per environment introduce?
basics
~20 sBuild once, deploy many means the pipeline produces a single versioned artifact and moves that exact artifact through every environment. Rebuilding per environment means production runs bits nobody tested, so the staging result no longer proves anything.
In a monorepo CI pipeline, what does a changed-file (path) filter do, and what does it fail to notice?
basics
~20 sA path filter compares the files a change touched against glob patterns and runs a job only when one matches. It sees file paths only, so it misses packages affected indirectly through dependency edges or shared root files.
CI pipelines are usually described as stages that contain jobs that contain steps. What is each of those three units actually responsible for?
basics
~20 sA stage is a unit of ordering — a named phase that acts as a barrier before the next one starts. A job is a unit of allocation — one machine and one workspace, and the thing that runs in parallel. A step is a unit of execution — one command inside a job.
Under Semantic Versioning 2.0.0, what do the MAJOR, MINOR and PATCH fields mean, and how do you decide which one a given change bumps?
basics
~20 sSemantic Versioning encodes compatibility: bump MAJOR for a backward-incompatible change to the public API, MINOR for backward-compatible new functionality, PATCH for a backward-compatible bug fix. The public contract decides the bump, not how much code changed.
In a CI/CD system, what is the difference between a provider-hosted runner and a self-hosted runner, and what does choosing self-hosted actually change?
basics
~20 sA provider-hosted runner is a fresh machine the CI vendor creates per job, bills per minute, then destroys. A self-hosted runner is a machine you own and register yourself: usually cheaper at volume and able to reach private networks, but you inherit patching, isolation and cleanup.
In GitOps, what is the difference between push-based and pull-based delivery to a Kubernetes cluster, and where does the cluster credential live in each model?
basics
~20 sPush delivery means the CI job holds a kubeconfig and runs kubectl or helm against the cluster. Pull delivery means an agent inside the cluster reads manifests from Git and applies them itself, so no outside system holds cluster credentials.
In a GitOps setup where an in-cluster agent syncs Kubernetes manifests from Git, how do you promote a version that is already running in staging to production?
basics
~20 sPromotion is a Git commit, not a deploy job. You change the production manifests to reference the exact image the staging environment already runs, merge that pull request, and the cluster agent converges production onto it.
In GitOps, what is the app-of-apps (root application) composition pattern, and what does it change about how a new component reaches a cluster?
basics
~10 sApp-of-apps is a root GitOps definition whose content is more GitOps definitions: the controller reconciles the root, the root creates the children, and the children deploy the workloads. Adding a component becomes one commit.
A team says they practise GitOps because their CI pipeline runs kubectl apply -f manifests/ on every merge to main. Which properties of GitOps does that pipeline already satisfy, and which does it miss?
basics
~20 sThat pipeline satisfies two of the four GitOps properties: the desired state is declarative and versioned in Git. It misses the other two, since nothing pulls that state automatically and nothing reconciles continuously, so drift between merges is never seen or corrected.
A CI runner that deploys to all your Kubernetes environments is compromised. What does the attacker gain under push-based delivery, and what does moving to pull-based delivery not protect you from?
basics
~20 sUnder push, the runner holds cluster credentials for every environment, so the attacker gets immediate admin-level access to all of them. Pull removes that credential, but not a poisoned image or a malicious commit, which the in-cluster agent will apply faithfully.