Introduction to Jenkins:
Jenkins is a Java-based open-source automation platform(server) with plugins designed for continuous integration processes in an automated fashion.
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.
Why Use Jenkins? ๐
Automated Builds: Jenkins can automatically trigger builds whenever new code is pushed to your version control repository. This ensures that your code is always in a build-ready state, making testing and deployment a breeze. โ๏ธ๐๏ธ
Continuous Integration: By integrating code changes frequently, Jenkins helps identify and resolve conflicts early in the development process. This prevents integration issues down the line and leads to more stable software releases. ๐๐ ๏ธ
Continuous Delivery: Jenkins can automate the deployment process, allowing you to release new features and fixes to your users quickly and reliably. This minimizes downtime and ensures a seamless user experience. ๐๐ฆ
Customizable Workflows: Jenkins provides a flexible and customizable pipeline system that allows you to define complex workflows tailored to your specific needs. You can automate tasks like testing, code analysis, and deployment in a structured manner. ๐งฉ๐
Task 1:
Create a freestyle pipeline to print "Hello World!!"
Steps for installing Jenkins-
Step 1: We need to install Jenkins on ur Linux operating system. Visit the following website for installing Jenkins - https://www.jenkins.io/doc/book/installing/linux/
Jenkins is a Java-based open-source automation platform so we need to install Java on our system. Copy and paste the following commands on your terminal.
Paste the following command on your terminal.
Step 2: Unlocking Jenkins - Jenkins server runs on port 8080 so add it to the security group of the EC2 instance server. After adding it to the security groups run the server on port 8080 then you will see the following page.
To find the password just type on your Ubuntu terminal:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Enter the password and continue then install the required plugins.
Step 3: Fill in the required information to create an Admin user and only this user has access to add another user.
Steps to Create a freestyle pipeline to print "Hello World!!"
Step 1: Using the Jenkins dashboard, click on New Item.
Step 2: Enter an item name and select the Freestyle project.
Step 3: Add a description to your project.
Step 4: Add build steps and select "Execute shell".
Step 5: Save it and then click ob Build now.
Step 6: See the console output once the build is triggered, click on the build number to view the console output of the echo command.