CI - CD Pipeline - Learn With Example
CI - CD Pipeline - Learn With Example
CI/CD pipeline introduces automation and continuous monitoring throughout the lifecycle of a software product. It involves from the
integration and testing phase to delivery and deployment. These connected practices are referred as CI/CD pipeline.
Continuous integration is a software development method where members of the team can integrate their work at least once a day.
In this method, every integration is checked by an automated build to search the error.
Continuous delivery is a software engineering method in which a team develops software products in a short cycle. It ensures that
software can be easily released at any time.
Continuous deployment is a software engineering process in which product functionalities are delivered using automatic
deployment. It helps testers to validate whether the codebase changes are correct, and it is stable or not.
(//cdn.guru99.com/images/2/100820_0534_CICDPipelin1.png)
Stages of CI/CD pipeline
Source Stage
In the source stage, CI/CD pipeline is triggered by a code repository. Any change in the program triggers a notification to the CI/CD tool
that runs an equivalent pipeline. Other common triggers include user-initiated workflows, automated schedules, and the results of other
pipelines.
Build Stage
This is the second stage of the CI/CD Pipeline in which you merge the source code and its dependencies. It is done mainly to build a
runnable instance of software that you can potentially ship to the end-user.
Programs that are written in languages like C++, Java, C, or Go language should be compiled. On the other hand, JavaScript, Python, and
Ruby programs can work without the build stage.
Failure to pass the build stage means there is a fundamental project misconfiguration, so it is better that you address such issue
immediately.
Test Stage
Test Stage includes the execution of automated tests to validate the correctness of code and the behaviour of the software. This stage
prevents easily reproducible bugs from reaching the clients. It is the responsibility of developers to write automated tests.
Deploy Stage
This is the last stage where your product goes live. Once the build has successfully passed through all the required test scenarios, it is
ready to deploy to live server.
Write up the current development process therefore, you can know the procedures that require to change and one that can be easily
automated.
Start off with a small proof of project before going ahead and complete whole development process at once.
Set up a pipeline with more than one stage in which fast fundamental tests run first.
Start each workflow from the same, clean, and isolated environment.
Run open source tools that cover everything from code style to security scanning.
Setup a better code hub to continuously check the quality of your code by running the standard set of tests against every branch.
Peer code review each pull request to solve a problem in a collaborative manner.
You have to define success metrics before you start the transition to CD automation. This will help you to consistently analyze your
software, developing progress help refining where needed.
Jenkins
(//cdn.guru99.com/images/2/100820_0534_CICDPipelin2.png)
Jenkins is an open-source Continuous Integration server that helps to achieve the Continuous Integration process (and not only) in an
automated fashion. Jenkins is free and is entirely written in Java. Jenkins is a widely used application around the world that has around
300k installations and growing day by day.
Features:
Jenkin will build and test code many times during the day.
Automated build and test process, saving timing, and reducing defects.
The code is deployed after every successful build and test.
The development cycle is fast.
Bambo
(//cdn.guru99.com/images/2/100820_0534_CICDPipelin3.png)
Bamboo (https://www.atlassian.com/software/bamboo) is a continuous integration build server that performs - automatic build, test,
and releases in a single place. It works seamlessly with JIRA software and Bitbucket.
Features:
CircleCI
(//cdn.guru99.com/images/2/100820_0534_CICDPipelin4.png)
Circle CI (https://circleci.com/) is a flexible CI tool that runs in any environment like a cross-platform mobile app, Python API server, or
Docker cluster. This tool reduces bugs and improves the quality of the application.
Features:
Cycle or Deployment Time: Cycle time is the time taken to go from the build stage to production. You can obtain average life cycle
time by measuring the development process phases. This metric will give insight into bottlenecks in your process and the overall
speed of development time.
Development Frequency: Development frequency allows you to analyse bottlenecks you find during automation. The more frequent
smaller releases reduce the risk of defects and fix them when found. Such a metric is an overall measure of your team efficiency.
Change Lead Time: It measures the start time of the development phase to deployment. This metric is an indicator of the entire
development process and how well the team works together.
Change Failure Rate: It focuses on the number of times development get succeeds vs. the number of times it fails.
MTTR vs. MTTF: MTTR (Mean Time to Recovery) is the amount of time required by your team to recover from failure. MTTF (Mean
Time to Failure) measures the amount of time between fixes and outages. These metrics are a reflection of the team's ability to
respond and fix issues.
Summary
Top Tutorials
(https://www.facebook.com/guru99com/)
(https://twitter.com/guru99com)
(http://guru99.link/recommends-
(/software- (/ethical-
(https://www.linkedin.com/company/guru99/)
kobiton-mobile) testing.html) hacking-
Kobiton Testing tutorials.html)
(https://www.youtube.com/channel/UC19i1XD6k88KqHlET8atqFQ)
(http://guru99.link/recommends-
(/software- Hacking
kobiton- testing.html) (/ethical-
mobile) hacking-
(https://forms.aweber.com/form/46/724807646.htm)
tutorials.html)
About
About Us (/about-
us.html)
Advertise with Us