We should remove the requirement for stages to have steps. Despite being silly to do, is this really an invalid Jenkinsfile?

      pipeline {
        agent any
        stages {
          stage('Do nothing') { }
        }
      }
      

      Right now, it fails with a message that there's "nothing to do". Similarly, the JSON validations include errors for stages that have no steps. But I don't know if it matters, it's not really an error, it's just the user doing something pointless. Adding an echo 'hello' is equally pointless.

      Unless there's a technical reason there need to be steps, we should remove this validation.

          [JENKINS-41530] Allow empty stages

          Keith Zantow created issue -
          James Dumay made changes -
          Link New: This issue is duplicated by JENKINS-44353 [ JENKINS-44353 ]
          Jesse Glick made changes -
          Link Original: This issue is duplicated by JENKINS-44353 [ JENKINS-44353 ]
          Andrew Bayer made changes -
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Liam Newman made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            abayer Andrew Bayer
            kzantow Keith Zantow
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: