DevOps & CI/CD: Enterprise Best Practices
Frequent merging, fast feedback, one package for every environment, the test pyramid, security scans, deployment strategies, and DORA’s five metrics. A summary in which every principle cites its source.
When people say CI/CD, tools come to mind first: Jenkins, GitHub Actions, Azure DevOps? Yet in organizations the bottleneck is rarely the tool. It is more often habits: how often code reaches the main branch, how quickly tests give feedback, and whether the same thing runs in every environment. In this article we go through each principle and cite its source.
Merging code often
DORA (DevOps Research and Assessment) describes trunk-based development as developers merging their work into trunk “at least once (and potentially several times) a day,” with branches lasting “no more than a few hours.” According to DORA’s 2016 and 2017 findings, teams working this way have three or fewer active branches and no code freezes or separate integration phases. Martin Fowler puts the same idea simply: every developer should commit to the mainline every day.
In practice it comes down to this: the longer a change lives, the more surprises you meet when you merge. Splitting a large feature into small, safely mergeable pieces is a skill, but it pays off.
Fast feedback on every commit
According to DORA’s continuous integration page, each commit should trigger a build, followed by automated tests that give feedback “in a few minutes.” The same page gives a practical upper limit: tests should not take more than about 10 minutes. DORA’s continuous delivery page adds that high performers get feedback from tests in less than ten minutes. When feedback takes longer, developers move on to other work instead of waiting, and have to rebuild their context when something fails.
The same package, the same process, in every environment
DORA’s deployment automation page recommends two things plainly: use the same packages for every environment, and use the same deployment process for every environment, including production. Deployment scripts and configuration should also live in version control. That leaves less room for “it worked in test”: what you tested is what goes to production.
The test pyramid
Martin Fowler’s practical test pyramid article suggests grouping tests by granularity and gives an idea of how many tests each group should have. His summary: write lots of small, fast unit tests, some more coarse-grained tests, and very few high-level tests that exercise the application end to end. End-to-end tests are slow and expensive to maintain, so keeping their number low is the healthiest approach.
Putting security into the pipeline
OWASP’s DevSecOps Guideline lists the scans that can appear in a basic pipeline: scanning repositories for credential leaks, SCA (software composition analysis), SAST (static application security testing), IaC scanning, software supply-chain security (SBOM, artifact signing), IAST, API security, DAST, and compliance checks. You do not have to set them all up at once. Our suggestion is to start with those that cut the most risk for the least effort: credential scanning and dependency (SCA) scanning.
Deployment strategies
| Strategy | What it does | Rollback |
|---|---|---|
| Blue-green | Two production environments, as identical as possible. One serves live traffic while the next release gets its final testing in the other; a router switches traffic between them. (Fowler) | Switching traffic back to the old environment gives a rapid rollback. |
| Canary | The new version is first deployed to infrastructure that receives no users, then users are routed to it a few at a time. Also called a phased or incremental rollout. (Fowler) | Route users back to the old version. |
| Feature toggle | Controls whether a feature is on or off through configuration while the code is already deployed. Fowler distinguishes release, experiment, ops, and permissioning toggles. | Turn the toggle off. |
A sample GitHub Actions pipeline
The pipeline below follows the pattern GitHub recommends for Node.js: get the code, set up Node, install dependencies with npm ci from the lockfile, run the tests, build. GitHub’s documentation notes that npm ci installs the versions in package-lock.json and is generally faster than npm install. Version numbers change over time, so check the current example in the actions/checkout and actions/setup-node repositories before you copy these lines.
name: ci
on:
pull_request:
push:
branches: [main]
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm test
- run: npm run build --if-presentYou cannot improve what you do not measure: DORA metrics
DORA’s page, last updated on 5 January 2026, defines software delivery performance with five metrics in two groups. The page also notes that the metrics evolved from the original four keys to today’s five-metric model, and it mentions the move from MTTR to failed deployment recovery time. So if you see older sources talking about four metrics and MTTR, know that the current naming differs.
| Group | Metric | DORA’s definition |
|---|---|---|
| Throughput | Change lead time | The time it takes for a change to go from committed to version control to deployed in production |
| Throughput | Deployment frequency | The number of deployments over a given period or the time between deployments |
| Throughput | Failed deployment recovery time | The time it takes to recover from a deployment that fails and requires immediate intervention |
| Instability | Change fail rate | The ratio of deployments that require immediate intervention following a deployment |
| Instability | Deployment rework rate | The ratio of deployments that are unplanned but happen as a result of an incident in production |
It matters to track speed and stability together. If you look only at speed, quality drops; if you look only at stability, you end up deploying less often.
A note on certification
Microsoft’s DevOps certification is changing too. According to Microsoft Learn, the AZ-400 exam and the Microsoft Certified: DevOps Engineer Expert certification will retire on 1 February 2027. Microsoft’s announcement of 15 October 2026 introduces the new Microsoft Certified: Agentic DevOps Engineer Expert certification and the AZ-401 exam, which is in beta. According to the announcement, you must also pass either GH-300 (GitHub Copilot) or AZ-104 (Microsoft Azure Administrator) to earn the certification. Verify current requirements on the Learn pages.