Day 23 - 90daysofdevops: Jenkins Freestyle Project for DevOps Engineers.????
Prakash Bohara
Immediate Joiner | #Engineer Devops ?? | MySQL | LINUX ??| Git/GitHub?? | AWS ? | DOCKER ??| KUBERNETES ?? | TERRAFORM ??? | JENKINS | ANSIBLE??| EKS/GKE
What is CI/CD?
CI/CD, which stands for Continuous Integration and Continuous Delivery, is a software development approach that aims to deliver software quickly and reliably. It involves a series of automated processes that are triggered whenever code is changed.
Continuous Integration :
Continuous Integration (CI) is the practice of merging all code changes from multiple contributors into a shared repository multiple times per day. This ensures that any errors are detected and corrected quickly, and that the codebase is always in a deployable state.
Continuous Delivery :
Continuous Delivery (CD) is the practice of automatically building, testing, and deploying software to production. This means that code changes can be released to production quickly and without manual intervention.
Tools for CICD :
There are many tools available for CICD, including:
What Is a Build Job?
A build job is an automated process that compiles, tests, and packages software code. It is a fundamental element of continuous integration and continuous delivery (CICD) pipelines, enabling developers to build and test their code frequently and reliably.
Key Characteristics of a Build Job:
Types of Build Jobs:
Task-01
Click on (New_item) then you will enter into Free Style project.
Give the name Free Style project Name(node-todo-cicd).
if Permission related error come follow below steps:
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "https://%2Fvar%2Frun%2Fdocker.sock/v1.24/build?buildargs=%7B%7D& Like this .
Add User to Docker Group: Add your user to the docker group, which should have the necessary permissions to access the Docker daemon socket. Run the following command:
sudo usermod -aG docker $USER
ls -l /var/run/docker.sock
领英推荐
sudo service docker restart
reboot
The produced image and container are visible. Additionally, a GitHub project was deployed to an Ubuntu EC2 instance at /var/lib/jenkins/workspace/jenkins-project-name.
Build the project.
After a build is completed, you can view the console output.
This is the Final Step But you have to set Allow or deny for Port and ip addresses in EC2 instance for login to this app.
Task-02
First Step install Docker compose :
Update the build step as per docker-compose.
Build the project.
After a build is completed, you can view the console output.