CI/CD Pipelines

CI/CD Pipelines
~/cloud-plus/modules/cicd-pipelines.md
bash — pipeline

# CI/CD Pipelines

A feature gets written, merged, tested, stored, and shipped — automatically, every time the code base changes. No more waiting years between versions. This lesson walks the pipeline stage by stage.

Continuous Integration Continuous Deployment Exam Objective 5.2

Rapid, consistent deployment of instances, containers, and applications doesn't happen by accident.

It's made possible by Infrastructure as Code and DevOps practices — chiefly CI/CD.

This lesson covers the automation tools, version control mechanisms, and scripting practices behind that pipeline.

EXAM OBJ 5.2

Explain concepts related to continuous integration/continuous deployment (CI/CD) pipelines. Expect the exam to test whether you can tell automation apart from orchestration, name the CI/CD workflow tasks in order, and recognize an artifact, a repository type, or a secure-code practice from a scenario.

What you'll cover

Click one off as you go — this only lives in your browser tab.

  • Trace a change through a full CI/CD pipeline, from commit to deployment.
  • Distinguish automation from orchestration.
  • Identify artifacts, repository types, and secure code practices.
0 / 3 reviewed

Continuous Integration / Continuous Deployment

Older software shipped in major versions, often years apart, with a steep learning curve every time. CI/CD replaces that: a developer adds a feature, it's integrated into the existing code base, the new version builds automatically, automated tests confirm nothing broke, and the result is delivered to a repository — ready to deploy. The cycle repeats every time the code base changes.

CI/CD is strongly tied to DevOps and Infrastructure as Code.Its flexibility and scalability make it a natural fit for deploying cloud-based web apps.

"Delivery" or "deployment"?

Sources use the "CD" differently. Both are correct — they mark two different points on the same pipeline.

Automation practices

Automation refers to a single task set to run on its own — not a series of tasks. A few kinds of sysadmin work are natural candidates.

Routine operations
Log archiving, account management, other repetitive jobs.
Deployments & updates
Rolling out new software, or a patched in-house app, quickly and consistently.
Scaling
Testing under load, or scaling out QA, with IaC for a predictable result.
Shutdowns & restarts
Includes making sure a locally installed agent restarts automatically with the system.
Internal APIs
Give a company's own developers programmatic access to speed up their work.

Troubleshooting automation

When an automated task fails, the cause usually falls into one of four buckets. Click one to see what to check.

Version mismatch
  • Managed node's OS or application version is incorrect
  • Configuration management tool version is incorrect
  • Configuration files provided don't match the deployment tool
Deprecated features
  • Configuration management is trying to use an OS feature that no longer exists
  • ...or an application feature that no longer exists
  • Older configuration files still contain deprecated settings
Job fails or fails validation
  • Confirm automation tasks actually began successfully
  • Check the automation software's logs
  • Check system logs
  • Find which step was the last one to complete successfully
Authentication errors
  • SSH key identities don't match (the user tied to the key changed)
  • SSH keys changed — local private key no longer matches remote public key
  • Service account isn't mapped correctly

Orchestration practices

"Automation" and "orchestration" aren't always used accurately, even though both are common across CI/CD, DevOps, and cloud administration. Automation sets a single task to run on its own. Orchestration configures a series of automated tasks to run together as one workflow. Same six-step web server deployment, run two different ways:

Sequencing matters — the OS must be installed before the web service is configured. A good orchestration workflow has the management tool confirm each step actually succeeded (e.g., that the instance exists) before starting the next one.

Workflow tasks

A CI/CD workflow splits into two halves. Under Continuous Integration: development, code merges, and testing happen, and the result lands in a repository. Under Continuous Deployment: code ships to targeted systems — on demand, or automatically as scaling and utilization require.

CI
Develop
Code — or a config language like JSON or YAML — is written to define functionality or deployment specs, then saved.
CI
Integrate
One author's changes merge with the current branch and everyone else's. Testing begins once integration completes.
CI
Test
Confirms changes didn't break the config file or app package. Integration testing happens at this stage.
CI
Repository
Passing code moves into central storage for change management, security, and version control.
CD
Build & deploy
Pulls source, compiles it, re-runs tests, packages it, and delivers the code to its destination.
CI develops, merges, tests  —  CD builds and ships

Troubleshooting orchestration

Job fails to complete / fails validation
Check orchestration logs, automation logs, and system/application logs. Confirm the job started successfully, then find the last automation step that finished cleanly.
Workflow fails outright
Usually a sequencing problem — or the system hadn't finished starting up before automation continued.

Deployment artifacts

An artifact is whatever the CI/CD workflow produces — code that's built and ready for production use. Click a type to see what it is.

Linux package managers

Often the step right after an orchestration workflow finishes deploying the VM itself — installing, updating, inventorying, and removing software from approved repositories. Mostly distribution-specific:

Package managerCommandUsed on
Red Hat Package ManagerrpmRHEL, Fedora, CentOS
Debian Package ManagerdebUbuntu, Mint, Debian
Yellowdog Updater ModifiedyumRHEL, Fedora, CentOS
Dandified YUMdnfRHEL, Fedora, CentOS

Code repositories

Repositories are more than storage — they're the endpoint that gives CI/CD and IaC work their repeatability, consistency, version control, and drift prevention. Services authenticate to them too, not just developers, and many integrate actions that handle merging, approvals, and vulnerability scans automatically. They can also hold configuration files, VM and container image files, documentation, and other process artifacts.

Public repositories
  • Open to anyone
  • Fits open-source software or files you deliberately want on the internet
  • Good for config templates, sample files, learning tools
Business resources should never be publicly available.
Private repositories
  • Access control — only authorized collaborators can use the resources
  • Self-hosted internally, or hosted on sites like GitHub or DigitalOcean
  • Hosted options remove the hardware burden, at the cost of less control over where data lives

Secure code management

Configuration files and scripts — Ansible, Puppet, Bash, PowerShell — aren't encrypted and are easy to read or modify. How you handle credentials and access inside them is a real security question, not an afterthought.

password: "Summer2026!"← never do this
🔒SSH key pair — private key local, public key remote, no prompt to interrupt automation
Ansible Vault — secrets encrypted at rest behind one vault password

Click a practice to see why it matters.

No hardcoded passwords
Authentication info stored directly in a script or config file sits in plain text — anyone who can read the file can read the password.
Key-based authentication
With SSH, a password prompt stops automation cold until someone types it in. A private key locally and a matching public key remotely authenticates automatically — no interruption, nothing embedded in the script.
Password vaults
Orchestrated deployments still need credentials sometimes. A vault (like Ansible Vault) protects that data at rest behind a single vault password, instead of leaving it sitting in a script.
Individual service accounts
Services and applications authenticate as themselves, not as a person, and get only the minimal permissions their role needs to run VMs, containers, or workloads.
Secure coding standard
Administrators need the same kind of guideline developers rely on — a defined, consistent way of writing and using automation code, even though specifics shift between tools like Ansible and Docker.
Principle of least privilege
Give a user or service the smallest set of permissions it needs — read, not write, if that's all a task requires. Default to deny: access has to be granted explicitly, never assumed.

$ module --status
CI/CD Pipelines · Objective 5.2