skip to content

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 pageshow

explore

→ has its own guide

questions

231 · 13 sections

In a GitHub Actions step, what does uses: reference, and what forms can that reference take?

level: juniorimportance: must knowfreq 75%
basics
~10 s

uses: 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).

open as a page

In a GitHub Actions workflow step, what is the difference between uses: and run:?

level: juniorimportance: must knowfreq 78%
basics
~20 s

A 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.

open as a page

In GitHub Actions, what does runs-on select, and what is a hosted ubuntu-latest runner?

level: juniorimportance: must knowfreq 80%
basics
~10 s

runs-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.

open as a page

In GitHub Actions, how do you pass a repository secret into a step safely?

level: juniorimportance: must knowfreq 78%
basics
~20 s

Reference 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.

open as a page

In GitHub Actions, how do branches: and tags: filters on push behave?

level: juniorimportance: must knowfreq 68%
basics
~20 s

They 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.

open as a page

In a GitLab CI job, what does the `environment:` keyword do, and what do its `name` and `url` fields control?

level: juniorimportance: must knowfreq 74%
basics
~20 s

The 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.

open as a page

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?

level: juniorimportance: must knowfreq 68%
basics
~20 s

GitLab 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.

open as a page

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?

level: juniorimportance: must knowfreq 68%
basics
~10 s

Declare 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:.

open as a page

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?

level: juniorimportance: must knowfreq 70%
basics
~20 s

A 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.

open as a page

In GitLab CI, how do you give every merge request its own review app environment, and where does the environment name come from?

level: middleimportance: must knowfreq 62%
basics
~20 s

Put 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.

open as a page

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`?

level: juniorimportance: must knowfreq 74%
basics
~20 s

agent 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.

open as a page

In a Jenkins Pipeline, what does the withCredentials step do, and how should a bound secret be referenced inside a sh step?

level: juniorimportance: must knowfreq 72%
basics
~20 s

withCredentials 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.

open as a page

In a Jenkins declarative Jenkinsfile, which blocks are mandatory, and where do the actual build commands go?

level: juniorimportance: must knowfreq 78%
basics
~20 s

A 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.

open as a page

In Jenkins, what is a plugin, and what does the Plugin Manager actually do when you install one?

level: juniorimportance: must knowfreq 70%
basics
~20 s

A 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.

open as a page

In a Jenkinsfile, what does the line `@Library('[email protected]') _` do, and why is there a bare underscore after it?

level: juniorimportance: must knowfreq 62%
basics
~20 s

It loads the Jenkins shared library registered as utils at version v1.4 — a branch, tag or commit in the library's repository — so the library's steps become callable in that Jenkinsfile. The underscore is a throwaway statement the annotation must attach to.

open as a page

In a CircleCI .circleci/config.yml, what is an orb, and what kinds of reusable elements can a single orb contain?

level: juniorimportance: must knowfreq 72%
basics
~10 s

An 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.

open as a page

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?

level: middleimportance: should knowfreq 45%
basics
~20 s

The 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.

open as a page

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?

level: seniorimportance: should knowfreq 52%
basics
~20 s

Every 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.

open as a page

In a CircleCI config, what is the practical difference between referencing an orb as circleci/[email protected], circleci/node@5, and circleci/node@volatile?

level: middleimportance: nice to knowfreq 30%
basics
~20 s

The 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.

open as a page

In a TeamCity build chain, how does a snapshot dependency differ from an artifact dependency between two build configurations?

level: middleimportance: must knowfreq 62%
basics
~20 s

A 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.

open as a page

In TeamCity, what is the Kotlin DSL, and how does a .teamcity/settings.kts file in your repository become the server's build configuration?

level: middleimportance: should knowfreq 55%
basics
~20 s

TeamCity'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.

open as a page

A TeamCity build sits in the queue reporting that no compatible agents can run it. How do you diagnose and fix it?

level: seniorimportance: should knowfreq 44%
basics
~20 s

Open 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.

open as a page

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?

level: principalimportance: nice to knowfreq 30%
basics
~20 s

A 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.

open as a page

What is a feed in Azure Artifacts, and which package types can a single feed host?

level: juniorimportance: must knowfreq 60%
basics
~20 s

An 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.

open as a page

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?

level: juniorimportance: must knowfreq 78%
basics
~10 s

Stages 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.

open as a page

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?

level: middleimportance: must knowfreq 50%
basics
~20 s

A 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.

open as a page

In an Azure Pipelines YAML pipeline, what does declaring a job as `deployment:` with an `environment:` give you that a plain `job:` does not?

level: middleimportance: must knowfreq 68%
basics
~20 s

A 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.

open as a page

Azure Pipelines YAML has three expression syntaxes — ${{ }}, $[ ] and $( ). When is each evaluated, and what breaks if you pick the wrong one?

level: middleimportance: must knowfreq 68%
basics
~20 s

Three 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.

open as a page

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?

level: juniorimportance: must knowfreq 78%
basics
~20 s

An 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.

open as a page

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?

level: juniorimportance: must knowfreq 78%
basics
~20 s

Argo 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).

open as a page

In Argo CD, what does an AppProject constrain, and what does the built-in project named default permit out of the box?

level: juniorimportance: must knowfreq 70%
basics
~20 s

An 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.

open as a page

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?

level: middleimportance: must knowfreq 80%
basics
~20 s

prune 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.

open as a page

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?

level: middleimportance: must knowfreq 62%
basics
~20 s

Argo 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.

open as a page

In Flux CD, which three custom resources make up image update automation, and what does each one contribute?

level: juniorimportance: must knowfreq 68%
basics
~20 s

Flux 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.

open as a page

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?

level: middleimportance: must knowfreq 70%
basics
~10 s

Flux 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.

open as a page

In a Flux ImageUpdateAutomation, how does the controller know which lines of a YAML manifest to rewrite when a new image tag is selected?

level: middleimportance: must knowfreq 56%
basics
~20 s

You 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.

open as a page

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?

level: seniorimportance: must knowfreq 55%
basics
~20 s

Work 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.

open as a page

In a Flux v2 Kustomization resource, what do the interval and prune fields control, and what happens if prune is left false?

level: juniorimportance: should knowfreq 58%
basics
~20 s

interval 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.

open as a page

In Octopus Deploy, what is the difference between a release and a deployment, and what does it mean to promote a release?

level: juniorimportance: must knowfreq 78%
basics
~20 s

In 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.

open as a page

In Octopus Deploy, what does a Lifecycle control, and how do its phases decide which environment a release may go to next?

level: middleimportance: should knowfreq 48%
basics
~20 s

An 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.

open as a page

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?

level: seniorimportance: should knowfreq 42%
basics
~20 s

Octopus 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.

open as a page

What is a runbook in Octopus Deploy, and when would you use one instead of adding a step to the project's deployment process?

level: middleimportance: nice to knowfreq 35%
basics
~20 s

An 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.

open as a page

In a Kamal deploy, how does the new container take over traffic from the one already running without dropping requests?

level: middleimportance: must knowfreq 48%
basics
~20 s

Kamal 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.

open as a page

A Kamal deploy has shipped a bad release. What does `kamal rollback` actually do, and in which situations will it not save you?

level: seniorimportance: should knowfreq 33%
basics
~20 s

kamal 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.

open as a page

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.

level: principalimportance: should knowfreq 40%
basics
~20 s

Kamal 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.

open as a page

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?

level: juniorimportance: nice to knowfreq 35%
basics
~20 s

Kamal 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.

open as a page

In GitHub Pages, what are the two publishing sources for a site, and how does each one get files onto the live site?

level: juniorimportance: should knowfreq 62%
basics
~20 s

GitHub 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.

open as a page

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?

level: middleimportance: should knowfreq 46%
basics
~20 s

A 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.

open as a page

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?

level: principalimportance: should knowfreq 40%
basics
~20 s

GitHub 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.

open as a page

How do you put a GitHub Pages site on a custom apex domain with HTTPS, and what DNS records and safeguards does that involve?

level: seniorimportance: nice to knowfreq 38%
basics
~20 s

Point 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.

open as a page

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?

level: juniorimportance: must knowfreq 74%
basics
~20 s

Build 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.

open as a page

In a monorepo CI pipeline, what does a changed-file (path) filter do, and what does it fail to notice?

level: juniorimportance: must knowfreq 72%
basics
~20 s

A 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.

open as a page

CI pipelines are usually described as stages that contain jobs that contain steps. What is each of those three units actually responsible for?

level: juniorimportance: must knowfreq 78%
basics
~20 s

A 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.

open as a page

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?

level: juniorimportance: must knowfreq 78%
basics
~20 s

Semantic 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.

open as a page

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?

level: juniorimportance: must knowfreq 72%
basics
~20 s

A 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.

open as a page

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?

level: juniorimportance: must knowfreq 68%
basics
~20 s

Push 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.

open as a page

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?

level: juniorimportance: must knowfreq 72%
basics
~20 s

Promotion 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.

open as a page

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?

level: middleimportance: must knowfreq 55%
basics
~10 s

App-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.

open as a page

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?

level: middleimportance: must knowfreq 72%
basics
~20 s

That 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.

open as a page

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?

level: seniorimportance: must knowfreq 58%
basics
~20 s

Under 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.

open as a page