Getting Started with Jenkins ๐(Day-22)
Jenkins: Empowering Continuous Integration and Continuous Delivery.
Extensive Plugin Ecosystem: Jenkins boasts a vast library of plugins that enable integration with numerous tools and technologies, ranging from version control systems (e.g., Git, SVN) to build and deployment platforms (e.g., Maven, Docker). This extensibility ensures flexibility and adaptability to a wide range of development environments.
Automated Build and Deployment: Jenkins automates the build process by compiling, testing, and packaging code changes into executable artifacts. Additionally, it facilitates automated deployment to various environments, reducing the likelihood of manual errors and ensuring consistent deployment procedures.
Scheduled and Triggered Builds: Jenkins can be configured to perform builds and tests on a regular schedule or in response to specific triggers, such as code commits or pull requests. This continuous feedback loop ensures that any integration issues are detected promptly, allowing developers to address them before they escalate.
Pipeline as Code: Jenkins introduces the concept of "Pipeline as Code," allowing developers to define the CI/CD workflow in a scripted format. This approach not only ensures version control for the build process but also simplifies collaboration and reproducibility.
Monitoring and Reporting: Jenkins provides detailed logs, reports, and notifications regarding the status of builds and deployments. This transparency aids developers and teams in identifying bottlenecks, failures, or performance issues.
Tasks:
1. What you understood in Jenkin, write a small article in your own words.
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.
2.Create a freestyle pipeline to print "Hello World!!
Creating a Freestyle Jenkins project involves setting up a project that allows you to perform various build and automation tasks without the need for writing code-based pipelines. Here's a step-by-step guide with an example explanation:
Step 1: Install and Set Up Jenkins If you haven't installed Jenkins yet, follow the official installation guide for your platform: jenkins.io/doc/book/installing
Step 2: Create a New Freestyle Project
Log in to your Jenkins dashboard.
Click on "New Item" in the top-left corner.
Enter a name for your project. Let's call it "FreestyleProject."
Select "Freestyle project" and click "OK."
Step 3: Configure the Project
You'll be presented with a project configuration page. Let's go through the sections:
1. General:
- You can leave this section with its default settings.
2. Source Code Management (Optional):
- If your project involves version control, you can configure your repository here. For this example, we won't be using this section.
3. Build:
- Click on the "Add build step" dropdown and select "Execute shell" (or "Execute Windows batch command" if you're on Windows).
Example Explanation: Let's say we want our Freestyle project to print "Hello World!!" as part of the build step.
In the "Command" box, enter the following command:
echo "Hello World!!"
4. Post-build Actions:
- You can leave this section with its default settings.
Step 4: Save and Run the Project
- After configuring the project, scroll down and click on the "Save" button at the bottom of the page.
Step 5: Run the Project
- On your project's main dashboard, you'll see a "Build Now" option on the left-hand side. Click on it to trigger the build.
Step 6: View Build Output
Once the build is complete, go back to your project's main dashboard.
Under the "Build History" section, you'll see the build number. Click on it to view build details.
Step 7: View Console Output
- In the build details page, you'll find a "Console Output" link. Click on it to see the output of the "Hello World!!" command and any other commands you added in the build step.
It's a versatile way to manage and automate your development processes without writing code-based pipelines.
Happy Learning :)
If you find my blog valuable, I invite you to like, share, and join the discussion. Your feedback is immensely cherished as it fuels continuous improvement. Let's embark on this transformative DevOps adventure together! ๐ #devops #90daysofdevop #git&github #jenkins