Complete the code to add a milestone step in a Jenkins pipeline.
milestone [1]The milestone step requires a numeric argument to mark the milestone number.
Complete the code to define a stage with a milestone step inside.
stage('Build') { steps { [1] 1 } }
The milestone step is placed inside the steps block to mark progress.
Fix the error in the milestone step syntax.
milestone([1])The milestone step expects a number without quotes, not a string or other types.
Fill both blanks to create a pipeline with two stages each having a milestone step.
pipeline {
agent any
stages {
stage('Test') {
steps {
[1] 1
}
}
stage('Deploy') {
steps {
[2] 2
}
}
}
}Both stages use the milestone step with different numbers to control concurrency.
Fill all three blanks to create a milestone-controlled pipeline with three stages.
pipeline {
agent any
stages {
stage('Build') {
steps {
[1] 1
}
}
stage('Test') {
steps {
[2] 2
}
}
stage('Deploy') {
steps {
[3] 3
}
}
}
}Each stage uses the milestone step with a unique number to manage concurrency.
