In this guide, you’ll learn how to install the Blue Ocean plugin in Jenkins, create and configure a multibranch pipeline with its graphical editor, archive build artifacts, publish JUnit reports, and view results both in Blue Ocean and the classic UI. Each step includes screenshots to illustrate the workflow.Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
1. Install the Blue Ocean Plugin
- Navigate to Manage Jenkins → Plugin Manager → Available.
- Search for blueocean, select the plugin bundle, and click Install without restart.
Blue Ocean requires Jenkins 2.x and the Pipeline plugin. Ensure your instance meets these prerequisites before installation.



2. Launch Blue Ocean and Create a New Pipeline
- Click Open Blue Ocean → New Pipeline.
- Select Git, enter your repository URL, and add credentials if needed.
- Blue Ocean will scan branches for a
Jenkinsfileand automatically trigger the pipeline if found.


3. Example Jenkinsfile and Stage Overview
Below is the sample Jenkinsfile stored in your repository. It defines three key stages:
| Stage Name | Purpose | Commands |
|---|---|---|
| Echo Version | Display Maven environment details | mvn -version |
| Build | Compile and package the app | mvn clean package -DskipTests=true |
| Unit Test | Execute unit tests | mvn test (with optional sleep loop) |

Viewing Console Logs
Echo Version stage output:
4. Inspect the Multibranch Pipeline Configuration
Blue Ocean automatically creates a Multibranch Pipeline job in the classic UI:
5. Edit the Pipeline in Blue Ocean
Back in Blue Ocean:- Select your branch and click the pencil icon to open the visual editor.
- Remove the sleep loop in Unit Test to simplify:
Jenkinsfile.
6. Archive Build Artifacts
- In the Build stage, click + Add Step → Archive Artifacts.
- Enter the file pattern:
target/hello-demo-*.jar.
7. Publish JUnit Test Results
The JUnit plugin is pre-installed, as shown here:
- Edit the Unit Test stage → + Add Step → Archive JUnit-formatted test results.
- Enter
target/surefire-reports/TEST-*.xmland select Keep properties and Keep test names.
8. Commit and Validate Changes
Click Save, add a commit message (e.g., “Archive artifacts and publish JUnit reports”), and push to themain branch:

If you mistype the artifact pattern (for example, Double-check your paths before committing.
hello-world-*.jar), the build will fail:9. View Pipeline Results
Once the pipeline completes successfully, Blue Ocean displays:- Build stage with archived artifacts
- Unit Test stage with pass/fail details
- A summary showing all tests passed

