First Job In Jenkins

To create a "Hello World" job in Jenkins, follow these steps:

  1. Access the Jenkins web interface: Open a web browser and navigate to http://localhost:8080 or the appropriate URL where your Jenkins instance is running.

  2. Log in to Jenkins: If this is your first time accessing Jenkins, you may need to enter the initial admin password provided during the setup process. Follow the instructions on the web interface to log in.

  3. Create a new job: On the Jenkins dashboard, click on "New Item" on the left-hand side. Enter a name for your job, such as "Hello World", and select "Freestyle project". Click "OK" to proceed.

  4. Configure the job:

    • General configuration: Provide a brief description of the job (optional).

    • Build section: Click on the "Add build step" dropdown and select "Execute shell" (for Linux/Unix) or "Execute Windows batch command" (for Windows). This allows you to run shell commands or batch commands as part of the build process.

    • Build command: In the command box, enter the following command:

      echo "Hello, World!"

      This command will print "Hello, World!" as the output of the build.

  5. Save the job configuration: Scroll down and click on "Save" to save the job configuration.

  6. Build the job: On the Jenkins dashboard, you will see the newly created job. Click on the job name to navigate to its details page. From there, click on "Build Now" to trigger the build.

  7. View the build output: Once the build is triggered, you will see a build in progress on the job details page. Click on the build number to view the build output. You should see "Hello, World!" printed in the console output.

Last updated