Day-22: Getting Started with Jenkins ๐
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.
Advantages of Jenkins
It has lots of plugins available
We can write our own Plug-in
We can use a community Plug-in
Jenkins is not just a tool. It is a framework i.e. we can do whatever we want. All we need is Plugins.
We can attach slaves(nodes) to Jenkins master. It instructs others(slaves) to do the job. If slaves are not available, Jenkins itself does the job.
Jenkins also behave as a crone server Replacement i.e. can do schedule task.
It can create labels.
Plugins
Plugins are small libraries that add new abilities to Jenkins and can provide integration points to other tools.
Firstly Install Java
sudo apt-get update
sudo apt install openjdk-11-jre
java --version
Then, Install Jenkins
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 active or not
systemctl status jenkins
Tasks:
Create a freestyle pipeline to print "Hello World!!
Thank you!! ๐