🌍 DevOps · subject
DevOps Continuous Integration Syllabus
The Continuous Integration syllabus for DevOps in full: 3 chapters and 9 topics, every one listed below, plus 53 Continuous Integration flashcards with answers.
Continuous Integration syllabus: all 3 chapters
Expand any chapter to see its topics and sub-topics.
-
Introduction to CI
2 topics- CI Concepts and Practices
- Benefits of CI
-
CI Tools
4 topics- Jenkins
- Travis CI
- CircleCI
- GitLab CI/CD
-
Setting Up a CI Pipeline
3 topics- Writing CI Configuration Files
- Automated Testing
- Build Automation
DevOps Continuous Integration flashcards — 53 questions with answers
What is Continuous Integration (CI)?
A software development practice where developers frequently merge their code changes into a shared central repository (often several times a day), after which automated builds and tests are run to detect integration problems early.
In CI, how often should developers integrate their code, according to its core principle?
At least once per day (ideally several times a day), so that integration errors are caught quickly while changes are still small.
What is the main problem that Continuous Integration is designed to solve?
"Integration hell" - the painful, error-prone effort of merging long-diverged branches all at once. CI avoids this by integrating small changes frequently.
What is a 'build' in the context of CI?
The process of converting source code and its dependencies into a runnable/deliverable artifact (e.g. compiling, linking, packaging), often combined with running automated tests.
What is the relationship between Continuous Integration, Continuous Delivery, and Continuous Deployment?
CI automatically builds and tests every change; Continuous Delivery extends CI by keeping the build always ready to release (deploy is a manual button); Continuous Deployment goes further and automatically deploys every passing change to production.
What is a CI pipeline?
An automated sequence of stages (e.g. build, test, package, deploy) that a code change passes through; each stage must succeed before the next runs.
What is 'mainline' or 'trunk' in CI practice?
The single shared, authoritative branch (e.g. main/master/trunk) into which all developers integrate their changes frequently.
What does 'fail fast' mean in CI?
The practice of detecting and reporting build or test failures as early and as quickly as possible, so problems are fixed while the relevant change is still fresh and small.
List three core practices of Continuous Integration.
Maintain a single source repository; automate the build; make the build self-testing (run automated tests on every commit). (Others: commit frequently, keep the build fast, fix broken builds immediately.)
Why should a broken build be the top priority to fix in CI?
A broken mainline blocks everyone else from integrating safely; fixing it immediately restores a known-good state and prevents compounding failures.
What is a 'green build' versus a 'red build'?
A green build means all stages and tests passed (the build is healthy); a red build means a stage or test failed (the build is broken).
List four key benefits of Continuous Integration.
Early bug detection, reduced integration risk, faster feedback to developers, and a consistently releasable/working codebase. (Also: less manual work, higher code quality, easier collaboration.)
How does CI reduce risk in software projects?
By integrating and testing small changes continuously, problems are caught early and isolated to a small recent change, making them cheaper and faster to diagnose and fix than large batched integrations.
What is meant by 'fast feedback loop' as a benefit of CI?
Developers learn within minutes whether their change builds and passes tests, allowing them to fix issues immediately rather than days later when context is lost.
What is Jenkins?
An open-source, self-hosted automation server written in Java, widely used to build, test, and deploy software via CI/CD pipelines, extensible through a large plugin ecosystem.
In Jenkins, what is a 'Jenkinsfile'?
A text file (committed to source control) that defines a Jenkins Pipeline as code, typically written in a Groovy-based domain-specific language.
What are the two syntax styles for a Jenkins Pipeline?
Declarative Pipeline (structured, opinionated, uses a 'pipeline { }' block) and Scripted Pipeline (more flexible, full Groovy, uses a 'node { }' block).
In a Jenkins Declarative Pipeline, what is the top-level structure of stages?
A 'pipeline' block containing an 'agent' directive, then a 'stages' block holding individual 'stage' blocks, each with a 'steps' block of commands.
What is a Jenkins 'agent' (formerly 'node/slave')?
A machine (or container) that connects to the Jenkins controller and executes the build/pipeline work; the controller orchestrates while agents do the execution.
How is Jenkins commonly extended to support new tools and integrations?
Through plugins - thousands of community plugins add support for source control, build tools, cloud providers, notifications, and more.
Show the other 33 Continuous Integration flashcards
What is Travis CI?
A cloud-hosted (SaaS) continuous integration service, historically popular for open-source projects on GitHub, configured with a '.travis.yml' file in the repository root.
What configuration file does Travis CI use, and where is it placed?
A YAML file named '.travis.yml' placed in the root of the repository.
In a '.travis.yml' file, what does the 'language' key specify?
The programming language of the project (e.g. python, node_js, ruby), which determines the default build environment and lifecycle steps Travis provides.
Name three lifecycle phases of a Travis CI build.
'install' (install dependencies), 'script' (run the build/tests), and 'deploy' (release). Optional hooks include before_install, before_script, after_success, and after_failure.
What is CircleCI?
A cloud-based (also self-hostable) CI/CD platform that runs pipelines defined in a YAML config file, known for fast parallel execution, Docker-based jobs, and reusable 'orbs'.
What configuration file and path does CircleCI use?
A YAML file at '.circleci/config.yml' in the repository.
In CircleCI, what is a 'job'?
A collection of steps run in a single executor (e.g. a Docker container or VM); jobs are the basic unit of work that can be combined into workflows.
In CircleCI, what is a 'workflow'?
A set of rules defining how jobs run - their order, dependencies, parallelism, fan-in/fan-out, and conditional/scheduled execution.
In CircleCI, what is an 'orb'?
A reusable, shareable package of YAML configuration (commands, jobs, executors) that condenses common tasks, such as deploying to AWS or running Slack notifications.
In CircleCI, what is an 'executor'?
The underlying environment in which a job's steps run - for example a Docker image, a Linux/Windows VM (machine), or a macOS environment.
What is GitLab CI/CD?
The built-in continuous integration and delivery system of GitLab, configured via a '.gitlab-ci.yml' file and executed by GitLab Runners.
What configuration file does GitLab CI/CD use?
A YAML file named '.gitlab-ci.yml' in the root of the repository.
What is a 'GitLab Runner'?
An agent application that connects to GitLab and executes the jobs defined in '.gitlab-ci.yml'; runners can be shared, group-specific, or project-specific and run jobs using executors like Docker or shell.
In GitLab CI/CD, what is a 'stage' and how do stages relate to jobs?
A stage is a phase of the pipeline (e.g. build, test, deploy). Jobs in the same stage run in parallel; stages run sequentially, and a later stage starts only if the previous stage succeeds.
In a GitLab '.gitlab-ci.yml', what does the 'script' keyword in a job define?
The shell commands the runner executes for that job (the actual work, such as compiling code or running tests).
In GitLab CI/CD, what is a 'pipeline'?
The top-level component composed of stages and jobs that runs automatically (typically on each push/merge request) to build, test, and deploy the code.
What data format is most commonly used for CI configuration files across tools like Travis, CircleCI, and GitLab?
YAML (YAML Ain't Markup Language), a human-readable, indentation-based data serialization format.
In YAML CI configs, why is indentation significant?
YAML uses indentation (spaces, not tabs) to denote structure and nesting; incorrect indentation changes meaning or causes parse errors.
What is the difference between defining the pipeline 'as code' versus configuring it through a UI?
'Pipeline as code' stores the build configuration in a version-controlled file in the repo (reproducible, reviewable, diffable), whereas UI configuration lives in the CI server and is harder to track and reproduce.
What are 'environment variables' used for in CI configuration?
To pass configuration and secrets (API keys, credentials, build flags) into jobs without hardcoding them in the repository; secret variables are typically masked and stored in the CI platform's settings.
What is 'caching' in a CI configuration, and why is it used?
Caching stores dependencies or build outputs (e.g. downloaded packages) between runs so they need not be re-fetched/rebuilt each time, speeding up pipelines.
What are CI 'artifacts'?
Files produced by a job (e.g. compiled binaries, test reports, coverage files) that are saved and can be passed to later stages or downloaded after the pipeline runs.
What is automated testing in the CI context?
The practice of running tests automatically (without manual intervention) on every code change to verify correctness and catch regressions before integration.
Define unit, integration, and end-to-end (E2E) tests and order them by scope.
Unit tests verify a single component in isolation (smallest scope); integration tests verify multiple components working together; end-to-end tests verify the whole system from the user's perspective (largest scope).
What is the 'test pyramid'?
A model recommending many fast, cheap unit tests at the base, fewer integration tests in the middle, and a small number of slow, expensive end-to-end tests at the top.
What is 'code coverage' and how is it calculated?
A metric for the proportion of code exercised by tests. A common form is line coverage: $$\text{coverage} = \frac{\text{lines executed by tests}}{\text{total executable lines}} \times 100\%$$
What does a 'self-testing build' mean in CI?
A build that automatically includes a suite of automated tests, so that a passing build also means the code passed its tests - making the build a reliable indicator of correctness.
What is a 'regression test'?
A test that re-checks previously working functionality to ensure new changes have not broken (regressed) existing behavior.
Why are fast tests important in a CI pipeline?
Because CI runs tests on every commit; slow tests delay feedback and discourage frequent integration, so keeping the build (and test suite) fast preserves the tight feedback loop.
What is build automation?
The practice of scripting and automating the steps to compile source code, resolve dependencies, run tests, and package artifacts, so builds are repeatable and require no manual steps.
Name three common build automation tools and the ecosystems they belong to.
Maven and Gradle (Java/JVM), Make (C/C++ and general), npm/Webpack (JavaScript), and MSBuild (.NET). Each automates compiling, dependency resolution, and packaging.
What is a 'reproducible build'?
A build that produces the same output artifact every time it runs from the same source and configuration, regardless of who runs it or where - achieved by pinning dependencies and isolating the environment.
Why are Docker containers commonly used in CI build automation?
They provide isolated, reproducible, ephemeral environments with pinned dependencies, ensuring builds and tests run identically on any machine and avoiding the "works on my machine" problem.
DevOps Continuous Integration FAQ
What is in the DevOps Continuous Integration syllabus?
DevOps Continuous Integration is split into 3 chapters: Introduction to CI, CI Tools and Setting Up a CI Pipeline. Together they contain 9 topics.
How many chapters are in DevOps Continuous Integration?
3 chapters, containing 9 topics. The largest chapter is CI Tools, with 4 topics.
Are there flashcards for DevOps Continuous Integration?
Yes — a 53-card Continuous Integration deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.