Certificate in DevOps
CI/CD Fundamentals
•
Certificate
DevOps and CI/CD Foundations
Introduction
Software organizations must deliver reliable changes quickly while responding to changing customer needs, security threats, and competitive pressures. Traditional software delivery often separated development, testing, operations, and security into specialized groups. Although specialization can improve expertise, excessive separation creates handoffs, delays, conflicting priorities, and limited visibility. DevOps emerged as a cultural, organizational, and technical response to these problems.
Continuous integration and continuous delivery (CI/CD) are central practices within DevOps. They provide repeatable ways to build, test, package, release, and operate software. CI/CD is not simply a collection of tools or an automated deployment script. It is a disciplined approach to reducing the time and risk involved in moving a change from a developer’s workstation into the hands of users.
This chapter introduces the software delivery lifecycle, DevOps culture, continuous integration, continuous delivery, continuous deployment, feedback loops, and the business value of delivery automation.
Learning Objectives
By the end of this chapter, you should be able to:
Explain the meaning and purpose of DevOps.
Describe the major stages of a software delivery lifecycle.
Distinguish continuous integration, continuous delivery, and continuous deployment.
Explain how automated feedback loops improve software quality and delivery performance.
Identify suitable CI/CD practices for a small software team.
Evaluate the business, technical, governance, and human implications of delivery automation.
1. The Software Delivery Problem
A software change passes through several activities before it creates value for a user. A typical lifecycle includes planning, coding, building, testing, releasing, deploying, operating, and monitoring. In a traditional organization, each activity may be owned by a different team. A developer may complete code weeks before an operations team is asked to deploy it. Testers may discover defects late, when correcting them is expensive and release schedules are already under pressure.
Common symptoms of a weak delivery system include:
large batches of changes accumulated before testing;
manual and error-prone deployment steps;
environments that differ from one another;
unclear responsibility for production incidents;
lengthy approval queues;
inadequate monitoring and slow diagnosis;
pressure to release despite unresolved defects.
The fundamental issue is not merely slow coding. It is the flow of work through the entire system. A locally efficient department can still contribute to globally poor performance if its work creates queues or rework elsewhere. DevOps therefore examines the whole value stream rather than optimizing only one department.
2. What DevOps Means
DevOps is a set of cultural values, organizational practices, and technical capabilities that enables development and operations professionals to collaborate in delivering and operating software safely and rapidly. The term combines “development” and “operations,” but its scope commonly includes quality engineering, security, product management, compliance, and business stakeholders.
DevOps is not:
a job title alone;
a synonym for one software product;
the elimination of all specialist roles;
permission to bypass testing or governance;
automatic deployment without risk controls.
Its central idea is shared responsibility for the results of software delivery and operation. Development teams should understand operational consequences, while operations teams should contribute early to design, testing, and automation. Security and compliance should be integrated into the delivery process rather than introduced only at the end.
2.1 Cultural foundations
Important cultural principles include:
Collaboration. Teams communicate across functional boundaries and solve problems together.
Shared ownership. A team remains concerned with a service after code is written; it considers reliability, security, supportability, and user outcomes.
Small, reversible changes. Smaller changes are easier to understand, test, review, deploy, and roll back.
Automation of repeatable work. Computers perform consistent, rule-based tasks while people focus on judgment, design, and improvement.
Learning from failure. Incidents are investigated systematically rather than used primarily for blame. This approach is often called a blameless learning culture, although it does not remove accountability.
Transparency. Work status, test results, deployment history, service health, and known risks are visible to relevant participants.
2.2 The CALMS perspective
A useful introductory model is CALMS:
Element
Meaning in practice
Culture
Collaboration, learning, and shared responsibility
Automation
Repeatable build, test, deployment, and operational tasks
Lean
Small batches, reduced waste, and continuous flow
Measurement
Evidence about delivery, quality, reliability, and outcomes
Sharing
Knowledge, feedback, tools, and responsibility across teams
CALMS is a teaching framework rather than a strict implementation sequence. An organization can automate a poor process and make it faster without making it better. Culture, process design, measurement, and automation must therefore develop together.
3. The Software Delivery Lifecycle
The software delivery lifecycle describes how an idea becomes a working product and how the product is maintained. It is not necessarily a one-way waterfall. Modern teams often repeat the lifecycle in short cycles, with operational evidence influencing future planning.
Software delivery lifecycle with feedback from operation to planning
Figure: Software delivery lifecycle with feedback from operation to planning
Figure: A delivery lifecycle in which operational feedback informs future planning.
3.1 Planning and design
Planning converts business needs, user problems, regulatory obligations, and technical concerns into an ordered set of work. Effective planning clarifies the intended outcome and acceptance criteria. It may also identify security requirements, data protection obligations, availability expectations, and dependencies.
3.2 Coding and version control
Developers create or modify source code, infrastructure definitions, configuration, documentation, and automated tests. Version control records who changed what, when, and why. A shared repository provides a reliable source of truth and enables review, branching policies, traceability, and rollback to known versions.
3.3 Build and test
A build transforms source code and dependencies into a deployable artifact. Testing may include unit, integration, API, security, performance, usability, and end-to-end tests. Tests should be selected according to risk; no test suite proves that software has zero defects.
3.4 Release and deployment
A release is an approved version made available for deployment or distribution. Deployment places that version into a target environment. These concepts are related but not identical: an organization may release an artifact for later deployment, or deploy a feature that remains hidden behind a feature flag.
3.5 Operation and monitoring
Operation includes hosting, scaling, backup, incident response, support, security monitoring, and cost management. Monitoring supplies evidence about system behavior, while logs, metrics, traces, user feedback, and incident reports help teams determine whether the system is meeting its objectives.
4. Continuous Integration
Continuous integration (CI) is the practice of frequently integrating small code changes into a shared repository and automatically validating those changes through builds and tests. The purpose is to detect integration problems close to the time they are introduced.
A basic CI workflow is:
A developer changes the code.
The change is committed and pushed to version control.
An automated pipeline builds the software.
Automated checks run.
Results are reported to the team.
A failed change is corrected promptly.
CI is effective only when the main branch remains usable and feedback is fast enough to influence developer behavior. A pipeline that runs once a month is automated, but it does not provide meaningful continuous integration.
CI practices
Commit small, coherent changes.
Keep the main branch buildable.
Use automated tests that are reliable and maintainable.
Make builds reproducible.
Store build definitions with the code where practical.
Make failures visible and assign responsibility for correction.
Avoid tests that depend unnecessarily on shared, unstable environments.
CI reduces integration risk, but it does not guarantee production quality. A pipeline may omit important tests, use unrealistic data, or validate only technical correctness while ignoring accessibility, security, or user value.
5. Continuous Delivery and Continuous Deployment
These terms are related and should be distinguished carefully.
Continuous delivery means that software is kept in a releasable state. Every change that passes the required automated and human checks can be deployed to production, usually through a deliberate release decision. Deployment may still require approval because of business timing, regulatory controls, contractual obligations, or operational risk.
Continuous deployment means that every change that passes the defined delivery pipeline is automatically deployed to production without a separate manual production approval.
Thus, continuous deployment is a possible extension of continuous delivery, not a synonym for it.
Practice
Primary question
Production action
Continuous integration
Does the change integrate and pass validation?
Usually no production deployment
Continuous delivery
Is the software always ready to deploy?
Deployment is controlled or approved
Continuous deployment
Can a validated change go directly to production?
Automatically deployed
Continuous deployment is more suitable when automated tests, observability, rollback, organizational confidence, and risk controls are mature. A safety-critical or highly regulated system may use continuous delivery without continuous deployment.
Pipeline stages and controls
A practical pipeline may contain source checkout, dependency resolution, compilation, unit tests, static analysis, packaging, integration tests, security scanning, artifact publication, environment deployment, smoke tests, approval, and production deployment. Controls should be proportional to risk. For example, a change to authentication logic deserves more scrutiny than a correction to a typo in internal documentation.
Security should be integrated as DevSecOps practice. Examples include dependency scanning, secret detection, least-privilege pipeline credentials, infrastructure validation, and review of security-relevant changes. Automated checks support governance but do not replace expert judgment.
6. Feedback Loops
A feedback loop is a process in which the result of an action is observed and used to guide the next action. CI provides rapid feedback about code integration. Testing provides evidence about behavior. Monitoring provides feedback about production operation. Customer research provides feedback about value and usability.
Short feedback loops reduce the time between cause and detection. When a test fails immediately after a commit, the relevant change is easier to identify. When a production incident is detected quickly and supported by useful telemetry, restoration and learning are more effective.
Feedback should be:
fast, so it arrives while context is still available;
reliable, so teams trust the signal;
actionable, so it suggests what requires attention;
visible, so the responsible people can respond;
proportionate, so the cost of feedback matches the risk.
Important feedback sources include code review, automated tests, deployment health checks, logs, metrics, distributed traces, customer support, usability research, and post-incident reviews.
Delivery performance measures
Teams often use four measures associated with delivery performance:
deployment frequency;
lead time for changes;
change failure rate;
time to restore service.
These measures should be interpreted together. Increasing deployment frequency while change failure rate and restoration time rise may indicate harmful acceleration. Metrics should support learning rather than encourage gaming or individual punishment.
A simple lead-time calculation is:
Lead time = Deployment time − Commit time
Here, both times must refer to the same change and use the same time zone or timestamp standard. Lead time is a duration, commonly measured in hours or days. This simple calculation describes one change; team-level summaries require a defined observation period and an appropriate aggregation method, such as a median or percentile.
7. Business Value of Delivery Automation
Automation creates value through several mechanisms.
Speed. Faster validation and deployment allow organizations to respond to customers and markets sooner.
Quality. Repeatable tests and procedures reduce certain classes of human error and detect defects earlier.
Reliability. Versioned, repeatable deployments reduce configuration drift and make recovery more predictable.
Visibility. Pipeline records show what was built, tested, approved, and deployed.
Scalability. A team can deliver more changes without increasing manual effort in direct proportion to workload.
Employee experience. Removing repetitive work can reduce frustration and allow professionals to focus on higher-value activities.
Automation does not automatically reduce cost. Tool subscriptions, maintenance, test infrastructure, training, pipeline failures, and migration work create costs. Automation produces value when it improves the overall flow and outcome of delivery, not merely when it increases the number of automated steps.
A useful business perspective compares total cost and benefit over time. Benefits may include avoided incidents, reduced manual effort, faster revenue realization, and improved customer retention. Costs include implementation, operation, training, and risk. These quantities are often uncertain, so decisions should use evidence and incremental experimentation rather than unsupported promises.
8. Illustrative Case: Northstar Booking Service
Background
Northstar is a fictional small company offering an online appointment-booking service. Developers worked in two-week cycles, but deployments occurred every two months. Operations personnel manually copied files to servers, edited configuration values, and performed a checklist from memory.
Problem
Releases frequently required weekend work. A configuration error caused two failed releases, and developers often learned about integration conflicts late. The business wanted faster delivery but could not accept uncontrolled changes to customer bookings.
Analysis
The main constraint was not programming capacity. The delivery system contained large batches, manual steps, late testing, and limited production feedback. The organization also lacked a clear rollback procedure and consistent environment configuration.
Approach and solution
Northstar introduced the following sequence:
All source code and configuration templates were placed under version control.
Developers committed smaller changes and used pull-request review.
A CI pipeline ran unit tests, API tests, dependency checks, and a reproducible build.
The build produced a versioned artifact used in each environment.
Deployment scripts replaced manual file copying.
A staging environment ran smoke tests using representative, non-production data.
Production releases required an explicit approval, preserving continuous delivery rather than adopting continuous deployment immediately.
Health checks, error rates, and booking-completion metrics were monitored after release.
A documented rollback procedure allowed the previous artifact to be restored.
Outcome
The team reduced the size of releases and gained earlier feedback. Deployment became repeatable, and responsibility for correcting failed pipeline checks became clear. The company did not eliminate all defects, but it reduced avoidable configuration errors and improved confidence in release decisions.
Learning points
The case illustrates that CI/CD is a system of practices rather than a tool installation. Version control, testing, artifact management, environment consistency, monitoring, and human decisions work together. It also demonstrates that continuous delivery can provide substantial value without requiring automatic production deployment.
9. Challenges, Limitations, and Governance
Technical challenges
Legacy systems may be difficult to test or deploy incrementally. Long-running tests slow feedback. Flaky tests create false alarms and reduce trust. Hidden dependencies, manual database changes, and environment differences undermine reproducibility. Teams should address these issues incrementally, beginning with high-risk and high-frequency activities.
Organizational challenges
Automation cannot compensate for unclear ownership, poor communication, or conflicting incentives. Managers should avoid rewarding teams solely for the number of deployments. Quality, security, reliability, customer outcomes, and sustainable workload matter as well.
Governance and compliance
A controlled pipeline can strengthen governance by recording approvals, test results, artifact identities, and deployment history. However, governance should not be confused with unnecessary bureaucracy. Good controls are risk-based, traceable, and as automated as practical. Access to production systems should follow least privilege, credentials should be protected, and sensitive data should not be copied into test environments without authorization and appropriate safeguards.
Ethical and social considerations
Delivery automation can improve reliability, but it can also create excessive surveillance of employees if metrics are used to rank individuals mechanically. Automation may change roles and require reskilling. Teams should communicate changes honestly, protect personal data in telemetry, and consider the effects of software releases on accessibility, fairness, safety, and vulnerable users.
Contemporary developments
Cloud platforms, containers, infrastructure as code, platform engineering, policy as code, and software supply-chain security have expanded CI/CD capabilities. Artificial intelligence can assist with test generation, code review, anomaly detection, and incident analysis. These uses require human review because AI-generated code or recommendations may contain defects, insecure patterns, licensing concerns, or misleading explanations. AI should augment accountable engineering decisions, not remove them.
10. Practical Starting Point for a Small Team
A small team can begin with a modest but disciplined workflow:
Select one service or application.
Place its code in version control.
Define a reproducible local build.
Add a small set of dependable automated tests.
Run the build and tests for every change.
Publish a versioned artifact.
Deploy the same artifact to a test environment.
Add health checks and basic operational monitoring.
Document approval, rollback, and incident responsibilities.
Review pipeline failures and improve one constraint at a time.
The objective is not to create the longest pipeline. It is to create trustworthy, timely feedback and a safe path from change to value.
Chapter Summary
DevOps is a collaborative approach to software delivery and operation based on shared responsibility, automation, small changes, measurement, and continuous learning. The software delivery lifecycle connects planning, coding, building, testing, release, deployment, operation, and feedback. Continuous integration frequently integrates and validates changes. Continuous delivery keeps software in a releasable state, while continuous deployment automatically places validated changes into production. Feedback loops make defects and operational problems visible sooner. Delivery automation can improve speed, quality, reliability, visibility, and scalability, but it requires suitable processes, governance, skills, and monitoring. Effective CI/CD is therefore a socio-technical capability, not merely a pipeline tool.
Key Terms
DevOps: A collaborative cultural, organizational, and technical approach to delivering and operating software.
CI/CD: Practices and automation supporting continuous integration, delivery, and deployment.
Software delivery lifecycle: The activities through which software is planned, created, tested, released, operated, and improved.
Version control: A system for recording and managing changes to files and source code.
Continuous integration: Frequent integration of changes with automated build and validation.
Continuous delivery: Keeping software in a releasable state through an automated and controlled process.
Continuous deployment: Automatically deploying every qualifying change to production.
Pipeline: An automated sequence of delivery activities and controls.
Artifact: A versioned, deployable output produced by a build.
Build: The process of transforming source code and dependencies into an executable or deployable form.
Feedback loop: A process in which observed results guide subsequent actions.
Observability: The ability to understand internal system behavior from outputs such as logs, metrics, and traces.
Rollback: Returning a system to a previous known version or state.
Change failure rate: The proportion of changes that cause incidents, remediation, rollback, or other failure outcomes.
Lead time for changes: The elapsed time between a change being committed and being deployed.
Infrastructure as code: Managing infrastructure through versioned, machine-readable definitions.
Feature flag: A mechanism that controls whether a feature is visible or active.
DevSecOps: Integrating security practices throughout development and operations.
Blameless learning culture: An approach that investigates system causes and learning opportunities without focusing primarily on personal blame.
Review Questions
Short Answer Questions
What is the central idea of DevOps?
How does continuous integration reduce integration risk?
Distinguish continuous delivery from continuous deployment.
Name three sources of feedback in a delivery lifecycle.
Why is version control important to CI/CD?
Long Answer Questions
Explain the major stages of the software delivery lifecycle and how they influence one another.
Discuss the cultural and technical foundations required for successful DevOps adoption.
Compare continuous integration, continuous delivery, and continuous deployment, including situations in which each is appropriate.
Explain how delivery automation can create business value and identify costs or risks that may offset that value.
Describe how governance and security can be integrated into a CI/CD pipeline without creating unnecessary bureaucracy.
Analytical / Application Questions
A team deploys only every three months and performs ten manual production steps. Propose a staged improvement plan and explain which risks each step addresses.
A company increases deployment frequency, but incidents and recovery time also increase. Analyze what the metrics may indicate and recommend corrective actions.
Design a basic CI/CD workflow for a small appointment-booking application. Identify its validation, approval, monitoring, and rollback controls.
Multiple Choice Questions with Answers
Question 1
Which statement best describes DevOps?
A. A single software tool used to deploy applications
B. A collaborative approach combining culture, practices, and technology for software delivery and operation
C. A method that removes all specialist engineering roles
D. A process that allows production changes without testing
Correct Answer: B. A collaborative approach combining culture, practices, and technology for software delivery and operation
Question 2
What is the primary purpose of continuous integration?
A. To delay integration until a major release
B. To detect integration problems soon after changes are introduced
C. To replace all forms of software testing
D. To guarantee that software has no defects
Correct Answer: B. To detect integration problems soon after changes are introduced
Question 3
Which statement correctly distinguishes continuous delivery from continuous deployment?
A. Continuous delivery keeps software releasable; continuous deployment automatically deploys qualifying changes to production
B. Continuous delivery applies only to documentation; continuous deployment applies only to code
C. Continuous deployment always requires more manual approval than continuous delivery
D. There is no meaningful distinction between the two practices
Correct Answer: A. Continuous delivery keeps software releasable; continuous deployment automatically deploys qualifying changes to production
Question 4
Which item is an example of an artifact?
A. A customer interview
B. A versioned deployable application package
C. A team meeting agenda
D. A business objective without implementation
Correct Answer: B. A versioned deployable application package
Question 5
Why are small changes generally preferred in CI/CD?
A. They eliminate the need for monitoring
B. They are easier to understand, test, deploy, and recover from
C. They guarantee continuous deployment is safe
D. They prevent teams from using version control
Correct Answer: B. They are easier to understand, test, deploy, and recover from
Question 6
A change was committed at 09:00 and deployed at 15:30 on the same day. What is its lead time?
A. 5 hours 30 minutes
B. 6 hours 30 minutes
C. 7 hours 30 minutes
D. 24 hours
Correct Answer: B. 6 hours 30 minutes
Question 7
Which practice most directly supports reproducible deployments?
A. Copying files manually from a developer’s computer
B. Using a versioned artifact and automated deployment definition
C. Changing production configuration by memory
D. Testing only after a release has failed
Correct Answer: B. Using a versioned artifact and automated deployment definition
Question 8
Which is the best example of a production feedback loop?
A. Monitoring error rates after deployment and using the results to guide corrective work
B. Deleting deployment records after release
C. Avoiding customer feedback to protect the schedule
D. Running a build only once per year
Correct Answer: A. Monitoring error rates after deployment and using the results to guide corrective work
Question 9
Why might a regulated organization choose continuous delivery without continuous deployment?
A. Automated testing is impossible in regulated systems
B. A deliberate approval may be required because of risk, regulation, or business timing
C. Continuous delivery does not use automation
D. Continuous deployment cannot use monitoring
Correct Answer: B. A deliberate approval may be required because of risk, regulation, or business timing
Question 10
Which statement about AI in CI/CD is most appropriate?
A. AI output never requires human review
B. AI can assist with testing or analysis, but its recommendations require accountable human evaluation
C. AI removes the need for security controls
D. AI guarantees that generated code is free of licensing and security concerns
Correct Answer: B. AI can assist with testing or analysis, but its recommendations require accountable human evaluation