Continuous Delivery: Principles, Infrastructure, Local Development, and Automated Pipelines
This article provides a comprehensive guide to continuous delivery, covering its definition, consensus and management mechanisms, required infrastructure, configuration and testing strategies, trunk and local development practices, six‑step commit workflow, code review, metrics, DevOps concepts, and information traceability.
Continuous delivery means delivering software in short cycles so that the product is always in a releasable state; every change passes an automated verification pipeline, which is a practice rather than a tool.
1 Infrastructure and Preparation
Infrastructure and Environment Management
Do not block developers; this is the core idea of continuous delivery.
Assign a build or release engineer per team to optimise the delivery pipeline.
Make project status visible to everyone involved in build, deployment, testing and release.
Perform risk management, including incremental delivery and strict access control for test, staging and production environments.
Conduct audit activities and enforce strict access control for privileged environments.
Configuration Management
Replace manual configuration of all environments with automated configuration.
Version‑control everything.
Pin exact versions of dependencies; avoid snapshots or version ranges.
Separate configuration files from binaries.
Testing Strategy
Create a comprehensive automated test suite (unit, component, acceptance) with >80% coverage for each.
Run the full suite on every change.
Adopt layered testing.
Data Management
Automate database creation and migration as part of the deployment process.
Each test should create its own isolated data state.
Version‑control the database schema (e.g., using DbDeploy).
Avoid using production data copies in tests.
Support blue‑green deployments and prefer additive schema changes.
Manage test data independently and avoid dumping production data unless necessary.
Handle data in the pipeline: fast test data for pre‑flight, reusable data for acceptance, and larger data sets for capacity testing.
2 Local Development
Enable developers to work without blockage or unnecessary interference, supporting continuous development.
Ensure automated tests and build/deploy scripts run on a developer's machine.
Run pre‑tested commits, personal builds, and pre‑flight builds locally to match pipeline validation.
Run all commit tests locally before pushing.
Deploy the application in a controllable local environment.
Prioritise fixing any change that breaks the application; do not commit new code if the build fails.
Six‑step Commit Method
Checkout the latest successful code.
Make changes.
Perform the first personal build.
Pull the latest trunk and run a second personal build.
Commit to the trunk.
Submit the build.
All commits must be non‑disruptive to existing functionality.
3 Automated Build/Deployment Pipeline
The deployment pipeline models the software delivery process.
Commit Stage
Compile, unit test, package, and run code analysis (target < 5‑10 minutes).
Run commit tests (unit & component).
If a failure prevents further tasks, stop immediately; otherwise, run all tasks and aggregate reports.
Outputs: report, binary package, metadata.
Automated Acceptance Testing
Configure environment, deploy binaries, run smoke and acceptance tests.
Failing acceptance tests block deployment.
Deploy first, then test; reuse deployment scripts.
Run acceptance tests in a production‑like environment, focusing on functional correctness, not performance.
Developers should be able to run acceptance tests locally.
Subsequent Tests
Manual exploratory and usability testing.
Non‑functional tests: performance, security, maintainability, scalability.
Deployment Release
Use the same scripts for all environments, including developer machines.
One‑click deployment is the only way to modify an environment.
Run smoke tests after deployment to verify success.
Ensure the deployment process is idempotent.
Only changes that passed automated build, test, and deployment may be released.
Define clear ownership for each environment’s deployment and release.
First release should produce documentation and automation scripts.
Continuous deployment: automatically deploy any version that passes all automated tests.
Metrics
Cycle time (from feature decision to delivery).
Automated test coverage.
Code‑base characteristics.
Defect count.
Delivery speed.
Number of commits to the repository.
Build count and failure count.
Build duration.
4 Other Topics
DevOps
DevOps bridges development and operations, aligning the whole team toward efficient software delivery.
Information Traceability
Link artifacts with source code versions (metadata in artifact packages).
Require commit messages to reference requirement, test case, and bug IDs.
The article also includes promotional links and a QR‑code invitation to a senior architect community, but the core content focuses on practical continuous‑delivery practices for software teams.
Top Architect
Top Architect focuses on sharing practical architecture knowledge, covering enterprise, system, website, large‑scale distributed, and high‑availability architectures, plus architecture adjustments using internet technologies. We welcome idea‑driven, sharing‑oriented architects to exchange and learn together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.