Post Linux, Git, and Docker will start our journey with Jenkins. Jenkins is a popular tool for CI/CD.
What is Jenkins?
Jenkins, written in Java, serves as an open-source DevOps tool specializing in continuous integration and continuous deployment or delivery (CI/CD) automation, enabling the creation of CI/CD workflows known as pipelines.
Functioning as an automation tool and open-source server, Jenkins facilitates software development tasks—building, testing, and deployment—for developers. Operating on Java, it orchestrates continuous integration of projects (jobs) and end-to-end automation processes.
Key to its functionality are plugins, allowing seamless integration across various DevOps stages. For instance, plugins like Git, Maven 2 project, Amazon EC2, and HTML publisher expand Jenkins' capabilities to accommodate specific tools.
The creation of a basic Jenkins job
Its termed as Freestyle project—involves several steps:
Access the Jenkins dashboard.
Click the "New Item" option.
Provide a name, select "Freestyle project" as the job type, and confirm with "OK."
Configure the project by specifying source code management, build triggers, environment settings, and tasks to execute in the build steps.
Define the desired actions, like executing shell commands or using specific tools, in the build step.
Save the configuration to create the project.
Initiate the project by clicking "Build Now."
In essence, Jenkins enables streamlined automation of software development processes through its versatile job configurations and plugin-based integrations.
Tasks:
Create a freestyle pipeline to print "Hello World!!
-Solution-
Step 1:
Jenkins used port 8080, so browse instance-public-IP/8080 it will open the Jenkins dashboard.
Click on the "New Item" button on the left sidebar.
Give your project a name, such as "demo-project" and select "Freestyle project" as the project type.
Step 2:
As the project is simply displays "Hello World" message, In the configuration section, scroll down and select the "Build" section and add an "Execute shell" build step and add a basic echo command to display message.
Click on the "Save" button at the bottom of the page to create the project.
Step 3:
Once the project is created, click on the "Build Now" link to run the project.
Step 4:
Check the console output for "Hello World" message.
I hope this introductory freestyle project sparks curiosity about CI/CD. In our next session, we'll delve deeper into its intricacies.
Thanks,
Kishor Chavan