Skip to main content

Command Palette

Search for a command to run...

Ci♾️cd

continuous integration and continuous deployment

Updated
5 min read
Ci♾️cd
K

Passionate about working on DevOps and actively immersing in learning it, And loves to write

Hey everyone, hope you are doing fine, if not you will be fine:)

And you are here to read about (CICD) Let's talk about cicd what is it? why it's involved in our lives? i will make sure after reading this blog, you can breathe good stuff regarding CICD and you will get a clear idea regarding it.

Now, let's understand what is ci and cd.

CI (continuous integration):-

Let's think about a situation if we as a developer developed a code and shared it to a codebase such as a git repository, where people in our team also share their version of the code.

And we are doing this continuously for weeks and the code works fine in the development area. but after testing suppose it's failing in the deployment server or building stage or any other stage.

Again you need to look back into the issue and it's not time efficient and cost-efficient also. so what if the code is tested at the same time as committing the changes, and how good it will be if we find out the errors at the initial stage of developing the code itself and fixing them.

It will be good and this method is time efficient and also cost-efficient. So the explanation of continuous integration is -->

****the moment when we commit the code into a repository at that instance itself the process of build and automation test initiates, so we will be confident enough that our code is working fine.

. And this happens for every commit that we make.

. So with this continuous integration, we will easily look up the issues in the early stages instead of writing the entire code for weeks and testing it later.

now let's what is "CONTINOUS DEPLOYMENT" ---->

CD(continuous deployment) :-

see many of us think that continuous delivery and continuous deployment is the same, but they are not.

let's talk first about

continuous delivery:-

suppose if a client asks what the update of the work, so here we need to show our work on a mock server where the client can see the progress of the work instead of directly deploying on the production environment, we create a mock server and push our work(code) there, it's known as continuous delivery.

now we see what is

continuous deployment:-

Hereafter integration we are having our code right which had gone through some automation and build tests,

so from there, the code is deployed directly to the production server, which means after we make a commit it directly hits the production environment(after a few tests).

so if there is any mishap then gone so it's a little scary.

And many companies won't opt for the CD they also Opt for CI.

so for the safe side, they go by manual deployment.

now after seeing the above picture hope we people got a good understanding.

And for this cicd process, there are many tools in the market but we look at some famous tools.

They are GITLAB, JENKINS, AZURE DEVOPS, TRAVIS CI

GITLAB - A built-in continuous integration and delivery service for GitLab, an open-source git management tool.

JENKINS - One of the most widely used open-source CI/CD tools. It provides a wide range of plugins for building, testing, and deploying code, and is highly customizable.

AZURE DEVOPS - A set of cloud-based tools from Microsoft that includes Azure Pipelines, a CI/CD service that supports multiple languages and platforms.

TRAVIS CI - A cloud-based CI/CD service that is popular among open-source projects. It integrates with GitHub and is easy to set up

But I prefer GITLAB because we can do any things in one place, And we can manage source code also since it integrates with git and Git Hub easily.

Now let's get into cicd explanation and what stages are involved.

There will be five stages in cicd namely --

  • Source Code Management

  • Build

  • Test

  • Deployment

  • Monitoring

we see this in detail -

Source Code Management

It is the first stage and it involves pulling code changes from a version control system (VCS) such as Git. This is where the developers push the code for review and testing.

Build

The second stage is to build the code, typically using a build tool such as Maven or Gradle. This step compiles the code, runs static analysis and unit tests, and produces the necessary artifacts (e.g. jar, war, or executable)

Test

In this test, we make the code undergo a few automation tests in different environments. Mainly the tests are like unit tests, integration tests etc.

Deployment

If the tests pass, the pipeline progresses to deployment. The artifacts are deployed to a staging environment for further testing by QA teams and then subsequently to production for end-users to use.

but here I need to give an introduction to the word pipeline,

Basically, the pipeline is typically made up of a series of steps or stages, each of which represents a specific task or set of tasks in the software development process.

we do all the above things in one place and we call it a pipeline***.***

Monitoring

This last stage is to monitor the deployed application for performance, errors, and other issues, and to quickly address any problems that arise.

I want to explain the hands-on of this process as well but will do it in another blog coz I don't want to extend this further.

HAPPY LEARNING :)

N

Informative blog

A

Thankyou Shyamsunder! it was very informative blog.

More from this blog

D

DevOps Community

14 posts

The DevOps/SRE community is for those folks who are trying to learn or explore DevOps with the help of experienced professionals. Opportunities are open to sharing.