Jenkins

Exploring the Jenkins UI

Build history and CICD visuals

In this lesson, we will examine the Jenkins dashboard and explore key aspects of our CI/CD pipeline builds. This walkthrough demonstrates how to interpret the dashboard details and highlights the fundamental components of a basic pipeline build.

Dashboard Overview

When you first access the dashboard, you might notice differences compared to previous layouts. After running several tests on the CI/CD pipeline, the updated dashboard now displays these test builds. For instance, click on "test one" to review its details.

Upon selecting "test one", you will observe that:

  • The pipeline is named "test one".
  • It consists of a single stage.
  • That stage executed and completed successfully.

This basic pipeline is essentially a "Hello World" sample provided by Jenkins.

The image shows a pipeline test interface with stage view details, including average stage times and a "Hello" stage taking 376ms.

Note

This simple pipeline run is used to quickly demonstrate how the Jenkins UI displays critical information such as build duration, failure status, and overall build history.

The dashboard presents several key pieces of information:

  • Last Duration: Indicates how long the pipeline ran.
  • Recent Failures: Displays the most recent failure, if any.
  • Last Successful Build Timestamp: Shows when the last successful build occurred.
  • Build Names and Aggregated Status: Offers an at-a-glance status report of recent builds, where a green checkmark marks a successful build and "not built" indicates a run that was skipped.

Clicking on the pipeline reveals additional details such as permalinks for the last build, the last stable build, and more. For example, you can view the initiator's identity and find options to preserve the build history indefinitely.

Initiating a Pipeline Build

When you click on "Build Now", a new pipeline run is triggered immediately. Notice how the dashboard reflects this change instantly:

The image shows a Jenkins dashboard displaying a successful build (#1) started by a user named Mike on January 1, 2022.

The dashboard confirms that the pipeline started at 15:12 (or 3:12 PM) and completed successfully, providing clear timestamps and status metrics.

The image shows a Jenkins dashboard with options like "Build Now" and "Configure," displaying build history and stage view with average stage times.

Clicking on the logs brings up detailed execution records where you can verify that the pipeline executed a simple "Hello World" print statement. The logs clearly display the execution details, confirming the pipeline's expected behavior.

Pipeline Code Example

Below is the Groovy script used to define this simple pipeline:

pipeline {
    agent any

    stages {
        stage('Hello') {
            steps {
                echo 'Hello World'
            }
        }
    }
}

This script illustrates the basic pipeline syntax as seen on the dashboard. You have the flexibility to modify, rename, or delete pipelines as needed. Whether you deploy a "build-only" process or a "build-and-deploy" workflow, the dashboard output will display:

  • What was executed.
  • The current status.
  • Any recent changes.
  • Options to disable the job if necessary.

The image shows a Jenkins pipeline dashboard with build options, stage view, and build history, displaying average stage times and recent changes.

Conclusion

This lesson provided an overview of what your CI/CD pipelines will look like in Jenkins. You learned how to navigate the build dashboard, interpret vital details, and review the execution logs. Now, try some hands-on practice exercises to apply what you've learned and deepen your understanding of Jenkins pipelines.

Next Steps

Explore additional resources such as Jenkins Documentation and CI/CD Best Practices to further enhance your skills.

Watch Video

Watch video content

Practice Lab

Practice lab

Previous
Managing the system and credentials