0
0
Jenkinsdevops~30 mins

Blue Ocean interface in Jenkins - Mini Project: Build & Apply

Choose your learning style9 modes available
Explore Jenkins Blue Ocean Interface
📖 Scenario: You are a DevOps engineer starting to use Jenkins for continuous integration. Jenkins has a modern interface called Blue Ocean that makes it easier to visualize and manage your pipelines.In this project, you will learn how to set up a simple Jenkins pipeline and explore the Blue Ocean interface to see your pipeline's progress and results.
🎯 Goal: Build a simple Jenkins pipeline script and open it in the Blue Ocean interface to visualize the pipeline stages and results.
📋 What You'll Learn
Create a Jenkins pipeline script with two stages
Add a configuration variable to control a message
Use the variable in the pipeline steps
View the pipeline output in Blue Ocean
💡 Why This Matters
🌍 Real World
Jenkins Blue Ocean interface helps DevOps engineers visualize and manage their continuous integration pipelines easily with a modern UI.
💼 Career
Understanding Jenkins pipelines and Blue Ocean is essential for roles in DevOps, CI/CD engineering, and automation testing.
Progress0 / 4 steps
1
Create a basic Jenkins pipeline script
Create a Jenkins pipeline script called Jenkinsfile with two stages: Build and Test. Each stage should have a simple echo command with the exact messages: Building project... and Testing project... respectively.
Jenkins
Need a hint?

Use the pipeline block with agent any. Define two stage blocks named exactly 'Build' and 'Test'. Inside each, use echo with the exact messages.

2
Add a configuration variable for the message
Add a variable called message at the top of the Jenkinsfile and set it to the string 'Hello from Blue Ocean!'.
Jenkins
Need a hint?

Define def message = 'Hello from Blue Ocean!' before the pipeline block.

3
Use the message variable in the pipeline steps
Modify the Build stage to print the message variable instead of the fixed text. Use echo message exactly.
Jenkins
Need a hint?

Inside the Build stage's steps, replace the fixed echo with echo message.

4
Print the pipeline output in Blue Ocean
Run the pipeline in Jenkins and open the Blue Ocean interface to see the pipeline stages and output. Then write echo 'Pipeline completed successfully' as the last step in the Test stage to confirm completion.
Jenkins
Need a hint?

In the Test stage's steps, add echo 'Pipeline completed successfully' after the existing echo.

Run the pipeline and open Blue Ocean to see the stages and messages.