CircleCI rewards a little discipline. These are the practices that keep it maintainable as a team and a codebase grow.
The practices
- Cache dependencies and use orbs for common steps
- Store secrets in contexts with restricted access
- Split tests with parallelism for speed
What good looks like
Workflow with caching and an orb.
version: 2.1
orbs: { node: circleci/node@5 }
jobs:
test:
docker: [{ image: cimg/node:20.11 }]
steps:
- checkout
- node/install-packages
- run: npm test
workflows:
build: { jobs: [test] }Anti-patterns to retire
- No caching, so dependencies download every build
- Secrets in config instead of project/context env vars
- One giant job instead of parallel workflows
Want senior help putting CircleCI to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.