http://jenkins-ci.org/commit/pipeline-model-definition-plugin/f25d40a2a5ffe0469ce80b070610d07fcdd3bb2a Log: [FIXED JENKINS-39011] Error out at parse time when pipeline step is nested. We don't want to support nesting the pipeline step within other blocks
- until
JENKINS-38152, we never noticed that this was actually possible, since the parse-time validation just ignored any Jenkinsfile without a root-level pipeline step, but with JENKINS-38152, we not only do another parse round but need to grab the stages from the model to attach to the run, so we hit an NPE when there's a pipeline step nested under other blocks.
So - this will now catch when the pipeline step is nested within another block and give an error message at parse-time, rather than NPEing at runtime. There is a valid use case for wanting to wrap the entire build in something like a timeout or timestamper, but we're going to address that with JENKINS-37823. |