5 Easy steps to know continuous integration and continuous deployment

In this article, we will explain you about What is Continuous integration and continuous deployment.


Continuous integration and continuous deployment


Before start to know about what is continuous integration and continuous deployment you have to understand what is DevOps first. So, you can understand it in simple way by visiting this article -> What is devops

Lets start What is CI/CD? Continuous integration and continuous deployment

In simple words I would say,

Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times on a daily basis. Then every integration can be verify by an automated build and automated tests.

Continuous Deployment (CD) It is a process of products or software release, it uses automated testing to validate changes to a codebase are correct and stable for immediate autonomous deployment in a production environment.

This process of moving source code from one machine to another and checking if it working as expectations Now, several tools can automate entire software deployment process, which allow developers and organizations to focus only on core business instead of infrastructure overhead. So, I hope you got a bit idea about What is CI-CD continuous integration and continuous deployment easy way

Lets see, prime benefits for Continuous integration and continuous deployment

Benefits of Continuous Integration?

  • QA team could spend less time on testing and focus on other significant improvements to the quality.
  • CI server can run more than hundreds tests in a seconds, so testing costs are automatically reduced.
  • There is less context switching as developers are changed as soon as they break the build and can work on fixing it before they move to perform another task.
  • Software Integration issues solved very fast so, it results to building the release became easy.
  • Regressions captured early by the automated tests. So, less bugs, error get shipped to production.

Benefits of Continuous Deployment?

  • Deployments process/pipelines are triggered automatically for every change. So, we can do development faster as there’s no need to take a pause for releases.
  • Products releases are less risky and easier to fix in case of any problem as we deploy small batches of changes.
  • Customers will be satisfied as continuous stream of improvements, quality increases every day and need not wait for every month, quarter or year.

Continuous integration and continuous deployment work flow




In above image you can see the exact work flow of Continuous Integration using various DevOps automation tools

Think about below points & Start Continuous Integration

You should always think on below mentioned major factors while starting your Continuous integration and continuous deployment process.

1. Select your Version system.
There is plenty of version management tools available and used by developers e.g. Git or Subversion. I will suggest respect the guidelines of building a repository don’t just use it as a backup method. Keep it clean and add only source code and configuration files. Not required to add large third party setup files or any other unused personal data like movies or images. Version control should always contain the latest healthy code that works when it gets checked out. Use guidelines that are available online, it can help you how to create your repository.

2. Decide your development strategy for Continuous integration and continuous deployment
Check and decide which type of development strategy you required. E.g. SCRUM or Kanban can be used to develop in small increments and integrate perfectly with Continuous Integration. Make sure everyone can understands and adopt the strategy which you have been selected.

3. Think and fix your delivery strategy
Now delivery strategy could be depending on what you are building and accordingly you choose a delivery strategy. Obviously delivery is the result at the end of development pipeline. C-D is ideal for application development the result can for example be an installation package which directly can be delivered to the QA tester or customer. It could also be used in web development where the result can be an update in the acceptance or real production environments.

4. Select your application version strategy

While working and understanding Continuous integration and continuous deployment process you should know about Version of software, communicates the changes and is ideally used to inform your clients of the latest updates. In large projects an example of a version number with four digits, like

can be:

4 is the application version, which means version 6 will be a complete rebuild
1 is the marketing version, which can be used by marketing to announce some new features added.
2 is the minor version, which is used every time there is a new release. It may includes e.g. bug fixes and minor features changes.
380 is the build or revision number, which will increment every change in repository.

5. Deploy your automation tool
In Continuous integration and continuous deployment process build automation tool is the dashboard of your test automation and the place where all the dots are connected. It basically consists of build steps. Every build step can execute its own separate piece, like running a Powershell script or invoke a checkout of the trunk. The build automation tool keeps track of the status ever build step returns. If all the build steps succeed, there will be a new potentially releasable software package. Examples of build automation tools are Ant, Phing (commandline tools), Jenkins, Team Foundation Server and TeamCity (Web based GUI tools).

6. Configure and implement unit tests
The basis of testing your software is unit testing. This means testing your methods and classes independently. PHP Unit and MSTest are some examples of programs that can execute unit tests and can be invoked from a build automation tool.

7. Auto build a test environment
To make sure your software is working correctly you need a test environment with your latest version of the software. The ingredients used to create such an environment are: compiling and building the latest source code (checked out from the trunk), add external content e.g. movies or third party too etc. and configure the environment (e.g.configuring Windows registry settings). At the end you should have a test-ready environment, build from scratch.

8. Test Automatically your software’s functionally
Try to find the core of your software and make sure all functionalities are tested on the test environment you created in the previous step. Simulate a user clicking through the application. Software like Selenium (for web apps) or AutoIT Scripting (for Windows apps) can realize this. It’s impossible to test everything, so try to find the most important spots of your app. It is recommended to create a “Happy flow” that follows the path of a user that always chooses the right options. From there on you can expand your tests incrementally as your software evolves. To reduce the build time it is also recommended to functional test in a parallel way.

9. Create an acceptance environment
If all functional tests are succeeded, it is possible to create an acceptance environment on-the-fly. This environment can be used for some additional manual testing. For example the Product Owner or QA department can use this to accept or decline a feature.

10. Ready your installation package
All tests, both unit and functional, are succeeded. This means your software meets most likely the most important quality requirements. At this point it is save to create a software package of the newest release. After the package is created, it is potentially shippable. The choice can be made to do some manual acceptance testing (on the Continuous integration and continuous deployment environment)

11. Make some error reporting
If a test fails it is important to get feedback, so you can debug the error. By creating a screenshot on error and add an error log and put these on a central place on the network, it will make life much more easier to find the solution for the error. The solutions from step 5 has notification systems to inform the team or individual when a build or test fails or succeeds.

12. Make backup of your Build Automation
Because your build automation ensures the quality of your product, it is promoted to be marked as important as well. That it is why a backup task should be created of the build automation logs and configuration. Also don’t forget to install a virus scanner if you use a build automation tool on a Windows environment.

So, I hope this article given you small overview about Continuous integration and continuous deployment.


Hope this article helpful for you, please like, share and subscribe to https://devopsarticle.com



Related Articles:

How to install jenkins

What is DevOps

What is Nagios How to install Nagios

How to secure Linux server

Download and install redhat linux 8 with 5 easy steps


Thanks for visiting to https://devopsarticle.com

Suresh Dike

Suresh Dike I am Suresh, working on Cloud, DevOps, Linux, Firewalls,Docker and Kubernetes. Believes in sharing the knowledge.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.