Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to add a milestone step in a Jenkins pipeline.
Jenkins
milestone [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string or label instead of a number.
Omitting the milestone number.
✗ Incorrect
The milestone step requires a numeric argument to mark the milestone number.
2fill in blank
mediumComplete the code to define a stage with a milestone step inside.
Jenkins
stage('Build') { steps { [1] 1 } }
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using other steps like echo or sh instead of milestone.
Placing milestone outside the steps block.
✗ Incorrect
The milestone step is placed inside the steps block to mark progress.
3fill in blank
hardFix the error in the milestone step syntax.
Jenkins
milestone([1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around the milestone number.
Passing a boolean or label instead of a number.
✗ Incorrect
The milestone step expects a number without quotes, not a string or other types.
4fill in blank
hardFill both blanks to create a pipeline with two stages each having a milestone step.
Jenkins
pipeline {
agent any
stages {
stage('Test') {
steps {
[1] 1
}
}
stage('Deploy') {
steps {
[2] 2
}
}
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using different steps like echo or sh instead of milestone.
Using the same milestone number for both stages.
✗ Incorrect
Both stages use the milestone step with different numbers to control concurrency.
5fill in blank
hardFill all three blanks to create a milestone-controlled pipeline with three stages.
Jenkins
pipeline {
agent any
stages {
stage('Build') {
steps {
[1] 1
}
}
stage('Test') {
steps {
[2] 2
}
}
stage('Deploy') {
steps {
[3] 3
}
}
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using other steps instead of milestone.
Repeating milestone numbers across stages.
✗ Incorrect
Each stage uses the milestone step with a unique number to manage concurrency.