What is CI, CD and CT?
What is
CI, CD and CT?
Benefits of
CI/CT/CD pipelines
A CI/CT/CD pipeline provides guardrails against
rogue or error-prone changes to the codebase, and early detection of code
defects. The pipeline also automates the entire deployment. Manual software
deployment is prone to human error. When an organization automates the steps
leading up to a release, it can ensure that both the code and deployment
process work correctly. When developers, QA engineers, tech support or other
team members find a defect, they can rely on the pipeline to automate a
rollback to the previous code version.
CI/CT/CD pipelines also enable another safeguard against problems in
production: feature flags. Feature flags are part of the codebase that controls
the release of new application features to a subset of clients. With feature
flags, you can hide functions within the application’s source code until
the feature is ready for selective or broad use. Feature flags can deploy
features in a small subset of users for canary testing. If those users
experience any issues, the organization can prevent or roll back the
deployment. Feature flags provide unparalleled control over the deployment from
the application itself.
Image: https://www.techtarget.com/searchsoftwarequality/tip/How-to-put-CI-CT-and-CD-together-in-a-DevOps-pipeline
How CI/CT/CD works
Let's walk through the sequence
of a CI/CT/CD pipeline and common tools therein.
Continuous integration. In the CI stage, developers write a feature, update,
or fix, then commit the code to a central code repository. Organizations often
use version control tools like GitHub and Atlassian Bitbucket. These
tools enable developers to write or modify code without interrupting another
developer's progress.
The next phase involves the
automation server, which triggers tests to run on the code. Configure the
automation server to watch when a particular branch in the code repository
receives a commit. The server should then pull down the code and kick off the
pipeline, move code from successful tests to build automation, and so on.
Jenkins is the most prolific automation server in the industry; others include
Atlassian Bamboo, CircleCI, Travis CI and CloudBees CI.
Continuous testing. In the initial stage of the pipeline, static code
analysis can check for syntax issues and common vulnerabilities. Use plugins in
the CI server to configure static code analysis with a tool from the likes of
SonarQube, Veracode or Codacy. Static code analysis is an initial test of the
code. If the code passes, the unit test stage comes next, unless these tests
were performed earlier in the pipeline. Unit tests ensure individual functions
perform correctly. The final test stage is functional testing, which comes
after the CI server triggers the build. Functional tests make sure that the
application or feature does what it is designed to do; they are the gatekeepers
before code deploys.
Continuous delivery. Once code passes all
the tests, the final stage is deployment. Within the context of a DevOps
pipeline, CD often refers to continuous delivery, but it can also
mean continuous deployment. The difference between continuous
delivery and continuous deployment is:
·
Continuous delivery puts a change in a staging
environment and the release schedule, where a person manually approves code,
then deploys it.
·
Continuous deployment automatically deploys code
to production once it passes tests.
Not all CI servers natively support CD, but plugins and shell scripts can
enable the practice. Tools to automate deployment include Terraform, AWS
CloudFormation, Chef, Puppet and Ansible. Terraform supports environment
configuration and release onto numerous cloud platforms such as AWS, Azure,
Google Cloud Platform and VMware VMs. Whether you use Terraform or another
tool, infrastructure configuration can take some time, depending on the type of
resources to be deployed. IaC tools provide a repeatable deployment process,
often with version-controlled configuration files that developers can modify as
needed.
The CI/CT/CD process, like the one detailed above, ultimately provides
an automated solution that results in safe deployments to production.
Rather than endure manual efforts that take a lengthy amount of time to
complete, and introduce human error, automate a DevOps pipeline to get more
time for important things -- and a little peace of mind.
Copied & Reference:
https://www.techtarget.com/searchsoftwarequality/tip/How-to-put-CI-CT-and-CD-together-in-a-DevOps-pipeline
Comments
Post a Comment