Table of contents
What is Jenkins?
Jenkins is an open source continuous integration-continuous delivery and deployment (CI/CD) automation software DevOps tool written in the Java programming language. It is used to implement CI/CD workflows, called pipelines.
Jenkins is a tool that is used for automation, and it is an open-source server that allows all the developers to build, test and deploy software. It works or runs on java as it is written in java. By using Jenkins we can make a continuous integration of projects(jobs) or end-to-endpoint automation.
Jenkins achieves Continuous Integration with the help of plugins. Plugins allow the integration of Various DevOps stages. If you want to integrate a particular tool, you need to install the plugins for that tool. For example Git, Maven 2 project, Amazon EC2, HTML publisher etc.
Let us do discuss the necessity of this tool before going ahead to the procedural part for installation:
Nowadays, humans are becoming lazy😴 day by day so even having digital screens and just one click button in front of us then also need some automation.
Here, I’m referring to that part of automation where we need not have to look upon a process(here called a job) for completion and after it doing another job. For that, we have Jenkins with us.
Tasks:
1. What you understood in Jenkin, write a small article in your own words
Answer:
Jenkins is an open source automation tool written in Java programming language that allows continuous integration.
Jenkins builds and tests our software projects which continuously making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build.
It also allows us to continuously deliver our software by integrating with a large number of testing and deployment technologies.
Jenkins offers a straightforward way to set up a continuous integration or continuous delivery environment for almost any combination of languages and source code repositories using pipelines, as well as automating other routine development tasks.
With the help of Jenkins, organizations can speed up the software development process through automation. Jenkins adds development life-cycle processes of all kinds, including build, document, test, package, stage, deploy static analysis and much more.
2.Create a freestyle pipeline to print "Hello World!!
Step 1: Create an instances
Step 2: Install java in your server
$ sudo apt update
$ sudo apt install openjdk-11-jre
$ java -version
openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment (build 11.0.12+7-post-Debian-2)
OpenJDK 64-Bit Server VM (build 11.0.12+7-post-Debian-2, mixed mode, sharing)
Step 3: Install Jenkins in your server by seeing the official website weekly release
curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.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/null
sudo apt-get update
sudo apt-get install jenkins
check whether Jenkins is installed or not by typing the command
systemctl status jenkins
Step 4: Open port 8080 in the instances security group because Jenkins runs on port 8080
Step 5: Copy your IP address
Step 6: Paste your IP address in google chrome and add ":8080" to the IP address
Step 7: Now you should see the page like this
Step 8: Now you should unlock Jenkins by adding Administrator password. To get this password run the cammand in your terminal
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Step 9: Copy that password and paste it their and press continue
Step 10: Install suggested plugins
Step 11: Now create your account in Jenkins and press save and finish
Step 12: Now click on start using Jenkins
Step 13: Now you directed to this page and click on create job
Step 14: Now type simple-test or any name you prefer and select freestyle project then click on "OK"
Step 15: Add description and in Build Steps select Execute shell
Step 16: Now you will see this area
Step 17: In this area write this command
echo "Hello World!!!"
Step 18: Now simply click on Build now
Step 19: Now you can see the progress here and click on #1
Step 20: You see this page and click on console output
Step 21: Here you can see our task has been completed
Thanyou for reading this blog and if any query or if any correction to be done in this blog please let me know.
contact us in Linkedin ,Twitter or email-id gurucharanu716@gmail.com