ci-cd
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| ci-cd [February 18, 2026 at 16:24] – yanevskiv | ci-cd [June 13, 2026 at 03:13] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | # CI/CD | ||
| + | **CI/CD** (continuous integration / continuous delivery) is the practice of automatically building, testing, and deploying software on every change. The goal is to keep the gap between "code written" | ||
| + | |||
| + | ## Continuous integration | ||
| + | |||
| + | Continuous integration means every branch or commit is automatically built and tested. The developer pushes a change; the CI system checks it out, compiles it, runs the test suite, and reports pass or fail within minutes. If the build breaks, the team knows immediately and can fix it before more changes pile on top. | ||
| + | |||
| + | The key discipline CI enforces is that the main branch is always in a releasable state. Without CI, " | ||
| + | |||
| + | A minimal CI pipeline for a C project might be: | ||
| + | |||
| + | ```yaml | ||
| + | # .github/ | ||
| + | on: [push, pull_request] | ||
| + | jobs: | ||
| + | build: | ||
| + | runs-on: ubuntu-latest | ||
| + | steps: | ||
| + | - uses: actions/ | ||
| + | - run: make | ||
| + | - run: make test | ||
| + | ``` | ||
| + | |||
| + | ## Continuous delivery | ||
| + | |||
| + | Continuous delivery extends CI: if the build passes, the artifact is automatically packaged and deployed to a staging environment, | ||
| + | |||
| + | Some teams distinguish continuous delivery (deploy to staging automatically, | ||
| + | |||
| + | ## What a pipeline looks like | ||
| + | |||
| + | A CI/CD pipeline is a sequence of stages: | ||
| + | |||
| + | ``` | ||
| + | push → lint → build → unit tests → integration tests → package → deploy to staging → (approval) → deploy to production | ||
| + | ``` | ||
| + | |||
| + | Each stage gates the next. A lint failure stops the build before running tests. A test failure stops deployment. This means problems are caught at the cheapest stage: a syntax error costs seconds to catch, not hours of manual testing. | ||
| + | |||
| + | ## Why it matters | ||
| + | |||
| + | Without a pipeline, integration risk accumulates silently. A small change that breaks an unrelated feature might not be discovered until the next manual release cycle, by which point other changes have been stacked on top, making the regression hard to isolate. CI/CD forces each change to stand on its own: it either passes the full suite or it does not land. | ||
| + | |||
| + | The secondary effect is that deployment becomes routine rather than an event. Teams that deploy many times per day develop much lower anxiety about deploying than teams that deploy once a quarter, because the consequence of a bad deploy is small: it is caught quickly and rolled back easily. | ||
