TABLE OF CONTENTS
To enter into Jenkins let's first understand what is CI/CD (Continuous Integration/Continuous Delivery or Deployment).
Continuous Integration
It is the process of automating the steps for developers by building and testing the code before merging it into the commit branch.
Developers push the code in small increments to Version Control System which is GitHub, i.e then build through some tools like Maven and then tested.
Continuous Delivery/Deployment
It is the process of releasing the final version of the code to the server environment may be it is in Production.
The basic difference between Continous Delivery and Continous Deployment is, In Continous Delivery, there is a need for manual intervention to push the final code into Production or a higher environment whereas in Continous Deployment the final code is deployed automatically through the pipeline setup.
For this setup of the CI/CD pipeline, we use the Jenkins tool.
Jenkins
The Jenkins project was started in 2004 by Kohsuke Kawaguchi. Jenkins is open-source software that helps in building, testing, and deploying, facilitating continuous integration and continuous delivery.
With the help of Jenkins, organizations can speed up the software development process through automation.
Jenkins Architecture
Jenkins follows Master-Slave architecture to manage distributed builds. In this architecture, the slave and master communicate through TCP/IP protocol.
Jenkins architecture has two components:
Jenkins Master server
Jenkins Slave server
Installing Jenkins
- Update your system
COPY
COPY
COPY
COPY
sudo apt update
- Install java
COPY
COPY
COPY
COPY
sudo apt install openjdk-11-jre
- Validate Installation
COPY
COPY
COPY
COPY
java -version
It should look something like this
- Just copy these commands and paste them onto your terminal.
COPY
COPY
COPY
COPY
curl -fsSL https://pkg.jenkins.io/debian/jenkins.io.key | sudo tee \ /usr/share/keyrings/jenkins-keyring.asc > /dev/null echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ https://pkg.jenkins.io/debian binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/nullsudo apt-get update sudo apt-get install jenkins
Now navigate to the Url with port 8080 and navigate to the path for admin password.
Now, install the suggested plugins.
Now, create the user and provide the details.
Finally, Login to the Url
Task
Create a freestyle project and display “hello world”
Go to new item and select freestyle project.
Provide the details in general settings.
Go to Build environment and then build step. Write the required code.
Click on build now to create the project.
Now, check the console output
Finally the Project is completed.
Thanks for reading my article. Have a nice day.
WRITTEN BY Biswaraj Sahoo --AWS Community Builder | DevOps Engineer | Docker | Linux | Jenkins | AWS | Git | Terraform | Docker | kubernetes
Empowering communities via open source and education. Connect with me over linktree: linktr.ee/biswaraj333