Deployment Pipeline
Table of Content:
Deployment Pipeline
Automated implementation of an application’s build, test, deploy and release process is known as deployment pipeline.
Shown are the typical stages a change passes through in the pipeline.
-
Any change in application’s configuration, source code, data or environment triggers a new instance of the pipeline.
-
In the pipeline, binaries and installers are created first.
-
Tests are run on the binaries.
-
A combination of code, configuration, data, and the environment is considered releasable only after passing the pipeline successfully.
Deployment Pipeline Advantages
-
Enables collaboration (each step is visible to the team).
-
Ensures issues are identified and resolved at an early stage.
-
Helps team to automatically deploy and release a software version anytime.
-
Aids team to identify inefficiencies in the release process.
-
Enables metrics collection (such as cycle time).
Pipeline Flow
Commit Stage
The commit stage includes:
-
Code compilation
-
Execution of commit tests
-
Binaries creation (for use at later stages)
-
Static code analysis
-
Artifacts creation (like test databases)
-
The release candidate is created after passing this stage.
-
Eliminates the code changes that are unfit for production.
-
Reports at the earliest to the developer if the application is broken.
-
The owner is the developer.
Commit Stage Practices
-
Create efficient, fast, non-environment dependent scripts.
-
Fail commit, if the build fails due to the compilation, test or environmental issues.
-
Design a fast user feedback mechanism.
Acceptance Testing Stage
-
A critical threshold in the deployment pipeline.
-
Takes delivery teams beyond basic continuous integration.
-
Tests every version of the software that passes the commit stage.
-
Changes that fails at this stage, is not deployed.
-
Validates if the system meets the business criteria.
Capacity Testing Stage
- Specific real-world scenarios are tested.
Practices to follow:
-
Set threshold limit for concluding the test result.
-
Plan short duration tests.
-
Tests must be repeatable.
Manual Testing Stage
-
Ensures system is usable and fulfills its requirements.
-
Detects bugs that are not identified in the previous stages.
-
This stage includes:
-
User Acceptance Testing
-
Testing in an exploratory or integration environment.
-
Release Stage
-
Delivers the system to users:
-
As packaged software or
-
Deploys it into a production or staging environment.
-
-
Also known as deployment stage.
Steps to deploy or release software:
-
Create and manage the infrastructure (like hardware, networking, etc.) on which your application will run.
-
Install the correct version of the application.
-
Configure the application, including any data it requires.
What are Dependencies?
Dependencies occur, when a piece of code depends on:
-
another part of the code (components) or
-
software (like libraries) to build or run.
Dependencies are represented by a Directed Acyclic Graph.
Dependency Types
-
Build-time: To be present when the code is compiled and linked.
-
Run-time: To be present when the application runs in an environment.
Managing Libraries
-
Check-in the libraries to the artifact repository.
-
Use a dependency management tool like Maven or Ivy to declare the libraries. It fetches the libraries from artifact repository when required.
Next section Component Pipeline elaborates on components dependency.