Challenge - 5 Problems
Pipeline Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Output of a simple Jenkins pipeline with stages
What will be the output in the Jenkins console log after running this pipeline?
Jenkins
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building project'
}
}
stage('Test') {
steps {
echo 'Running tests'
}
}
}
}Attempts:
2 left
💡 Hint
Stages run in the order they are defined.
✗ Incorrect
The pipeline runs stages in the order: Build then Test. Each stage prints its own message.
🧠 Conceptual
intermediate1:30remaining
Understanding parallel stages in Jenkins pipeline
Which statement about parallel stages in Jenkins pipeline is true?
Attempts:
2 left
💡 Hint
Think about how parallel means 'at the same time'.
✗ Incorrect
Parallel stages allow Jenkins to run multiple stages simultaneously, speeding up the pipeline.
❓ Configuration
advanced2:30remaining
Correct syntax for a Jenkins pipeline with parallel stages
Which pipeline code correctly defines two parallel stages named 'Test1' and 'Test2' that echo different messages?
Attempts:
2 left
💡 Hint
Parallel block must be inside a stage, and parallel stages are nested inside it.
✗ Incorrect
Option A correctly nests parallel stages inside a parent stage using the 'parallel' block with stages inside.
❓ Troubleshoot
advanced2:00remaining
Identifying error in Jenkins pipeline stage definition
What error will this Jenkins pipeline produce?
Jenkins
pipeline {
agent any
stages {
stage('Build')
steps {
echo 'Building'
}
}
}
}Attempts:
2 left
💡 Hint
Check the braces and indentation after the stage keyword.
✗ Incorrect
The stage block is missing an opening brace '{' after the stage name, causing a syntax error.
🔀 Workflow
expert3:00remaining
Order of execution in a Jenkins pipeline with nested stages
Given this pipeline, what is the order of echo outputs in the console log?
Jenkins
pipeline {
agent any
stages {
stage('Deploy') {
stages {
stage('Deploy to Dev') {
steps { echo 'Deploying to Dev' }
}
stage('Deploy to Prod') {
steps { echo 'Deploying to Prod' }
}
}
}
stage('Cleanup') {
steps { echo 'Cleaning up' }
}
}
}Attempts:
2 left
💡 Hint
Nested stages run in order inside their parent stage before moving on.
✗ Incorrect
The nested stages inside 'Deploy' run in sequence: 'Deploy to Dev' then 'Deploy to Prod', then the next top-level stage 'Cleanup' runs.