About ci/cd pipeline generator
Continuous integration builds and tests every change, and continuous delivery ships it. A basic pipeline runs install, lint, test and build.
Good pipelines are
- Fast, using caching and running independent jobs in parallel.
- Reliable, with tests that do not fail at random.
- Safe, with secrets stored in the CI settings.
A worked example
A pipeline for a web app has stages for install, lint, test and build, and a deploy job that runs only on the main branch after the others pass. Caching dependencies between runs often cuts several minutes off each build.
Good pipelines
- Fail fast: run quick checks like linting first.
- Make builds repeatable by pinning tool versions.
- Keep deployment credentials in the CI secrets store.
Branch rules
Run tests on every pull request and deploy only from the main branch. Require the checks to pass before merging, so that the main branch always stays releasable.
