When building a Jenkins pipeline job (Jenkins ver. 2.7.4), I get this warning:
Using the ‘stage’ step without a block argument is deprecated
How do I fix it?
Pipeline script snippet:
stage 'Workspace Cleanup'
deleteDir()
From Jenkins pipeline stage step doc:
An older, deprecated mode of this step did not take a block argument...
In order to remove the warning just add a block argument:
stage('Stage Name') {
// some block
}
You can also generate a stage step using Snippet Generator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With