Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54256

Pipeline stages can be nested indefinitely

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None

      This is an uncommon situation, and not blocking anything, but it seems that there is no limit on the number of times you can nest stages in a Pipeline, even though as per the following, the limit should be two levels of stage nesting when in a sequential stage:

      https://jenkins.io/doc/book/pipeline/syntax/#sequential-stages
      "The stages within stages in a stage cannot contain further parallel or stages themselves, but they do allow use of all other functionality of a stage, including agent, tools, `when, etc."

      Attached is a testcase:

      Jenkinsfile

      When this is run, it passes without any warnings or errors, even though this should be technically unsupported. Here is the log:
      log

       

      I'm unsure if we should warn users in this situation, or update the sequential stage documentation at https://jenkins.io/doc/book/pipeline/syntax/#sequential-stages

        1. Jenkinsfile
          0.7 kB
        2. log
          0.6 kB

            Unassigned Unassigned
            rkivisto Ray Kivisto
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: