This content originally appeared on DEV Community and was authored by On-cloud7
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.
Steps to Create a freestyle pipeline to print “Hello World!!
Step 1: Create an AWS EC2 instance.
Step 2: Install Jenkins on the EC2 instance.
For steps to install jenkins check:
1.sudo apt update
2.sudo apt install openjdk-17-jre
3.java -version
4.curl -fsSL https://pkg.jenkins.io/debian-stable/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-stable binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
5.sudo apt-get update
6.sudo apt-get install jenkins
7.sudo systemctl enable jenkins
8.sudo systemctl start jenkins
9.sudo systemctl status jenkins
Step 3: Access Jenkins on the browser using the public IP of the EC2 instance and 8080 port.
Step 4: Create a new item in Jenkins using freestyle project type.
Step 5: Give a name to the Project “HelloWorld”
Step 6: In the configuration section, in the “Build” section, add an “Execute shell” build step
Step 7: Add the command to print “Hello World”.
Step 8: “Save” it to create the project.
Step 9: Now click on the “Build Now” to run the project.
Step 10: Check the console output for “Hello World” message.
This content originally appeared on DEV Community and was authored by On-cloud7
On-cloud7 | Sciencx (2024-07-02T13:11:25+00:00) Day-22 : Getting Started with Jenkins. Retrieved from https://www.scien.cx/2024/07/02/day-22-getting-started-with-jenkins/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.