Day-22 : Getting Started with Jenkins ๐Ÿ˜ƒ๐Ÿง‘โ€๐Ÿณ

Day-22 : Getting Started with Jenkins ๐Ÿ˜ƒ๐Ÿง‘โ€๐Ÿณ

Linux, Git, Git-Hub, Docker finish ho chuka hai to chaliye seekhte hai inko deploy krne ke lye CI-CD tool:

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.

Let us do discuss the necessity of this tool before going ahead to the procedural part for installation:

  • Nowadays, humans are becoming lazy๐Ÿ˜ด day by day so even having digital screens and just one click button in front of us then also needs some automation.

  • Here, Iโ€™m referring to that part of automation where we need not have to look upon a process(here called a job) for completion and after it do another job. For that, we have Jenkins with us.

  • How To Install Jenkins On Windows 10

How to install Jenkins on Ubuntu

Tasks:

  1. Create a freestyle pipeline to print "Hello World!!

    To create a freestyle pipeline in Jenkins to print "Hello World!!", you can follow these steps:

    1. Log in to your Jenkins server and navigate to the Jenkins dashboard.

    2. Click on "New Item" to create a new Jenkins job.

    3. Enter a name for your pipeline (e.g., "Hello-World") and select "Freestyle project", then click "OK".

    4. On the configuration page, scroll down to the "Build" section and click on "Add build step".

    5. From the dropdown menu, select "Execute shell" (if you're on a Unix-based system) or "Execute Windows batch command" (if you're on a Windows system).

    6. In the command input field, enter the following command:

       echo "Hello World!!"
      
    7. Click "Save" to save the pipeline configuration.

    8. Now, you can run the pipeline by clicking on "Build Now" on the left-hand side of the Jenkins dashboard.

    9. Once the build is triggered, Jenkins will execute the pipeline, and you should see the "Hello World!!" message printed in the build console output.

That's it! You have created a freestyle pipeline in Jenkins to print "Hello World!!".

ย