Recall & Review
beginner
What is the purpose of the
milestone step in Jenkins pipelines?The
milestone step helps control concurrency by marking a point in the pipeline. It ensures that only the latest build passes this point, canceling older builds that are behind it.Click to reveal answer
beginner
How does the
milestone step improve pipeline efficiency?It prevents multiple builds from running the same or outdated stages by canceling older builds that haven't reached the milestone, saving resources and time.
Click to reveal answer
intermediate
Where should you place the
milestone step in a Jenkins pipeline?Place it at key points in the pipeline where you want to ensure only the latest build continues, such as before long-running or resource-heavy stages.
Click to reveal answer
intermediate
What happens if an older build reaches a
milestone after a newer build has already passed it?The older build is stopped immediately to avoid redundant work, ensuring only the newest build proceeds.
Click to reveal answer
beginner
Write a simple Jenkins pipeline snippet using the
milestone step.pipeline {
agent any
stages {
stage('Build') {
steps {
milestone 1
echo 'Building...'
}
}
stage('Test') {
steps {
milestone 2
echo 'Testing...'
}
}
}
}
Click to reveal answer
What does the Jenkins
milestone step do?✗ Incorrect
The
milestone step stops older builds that have not reached the milestone when a newer build passes it.Where is the best place to use the
milestone step in a Jenkins pipeline?✗ Incorrect
Placing
milestone before heavy stages helps cancel outdated builds early, saving resources.If a newer build passes a milestone, what happens to older builds that haven't reached it?
✗ Incorrect
Older builds behind the milestone are stopped to avoid redundant work.
Which of these is NOT a benefit of using the
milestone step?✗ Incorrect
The
milestone step does not fix errors; it manages concurrency.How do you specify a milestone number in a Jenkins pipeline?
✗ Incorrect
You specify the milestone with a number like
milestone 1.Explain how the
milestone step helps manage concurrency in Jenkins pipelines.Think about how to avoid running outdated builds.
You got /4 concepts.
Describe a scenario where using the
milestone step would improve your Jenkins pipeline.Imagine many builds queued and wasting resources.
You got /4 concepts.