What is Jenkins?
Jenkins is a popular open-source tool for building, testing, and developing software. Jenkins functions as an essential tool in software development, providing Continuous Integration and Continuous Delivery (CI/CD) capabilities. It automates and streamlines the repetitive tasks within the software development process. This enables teams to maintain a smoother and more efficient software development lifecycle. Developers can set up Jenkins to monitor repositories for changes in the source code. When changes are detected, Jenkins can automatically initiate predefined tasks, such as compiling code, running tests, and deploying applications. Jenkins provides a web-based user interface for configuration and management, and it supports a vast array of plugins that extend its functionality. These plugins enable integration with various version control systems, build tools, testing frameworks, and deployment mechanisms, making Jenkins highly adaptable to different workflows and project requirements.
NOTE: I've installed Jenkins on my machine(as it was a part of previous tasks)
We will be creating a very basic job that will throw some output. So, let us begin. Creating and running a job on Jenkins is as follows:
Step 1: Sign in to Jenkins
Step 2: Click on "New Item"
Step 3: You will have a page on which you have to give your name to your job and choose ‘Freestyle project’ as your project type
Step 4: Now, we will give some description of our job and now, you have to provide which source code management tool you are using since here we are not using anyone so will choose the "none" option.
Step 5: Scroll down to the “Build” section in the configuration section and add an “Execute shell” build step.
Step 6: Type the command to print “Hello...this is my first Jenkins demo : $(date)”
To create the project, click the “Save” button at the bottom of the screen.
Step 7: To launch the project after it has been built, click the “Build Now” option.
Step 8: Check the console output and see whether your job has failed or been successful.