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

Nested declarative pipelines

XMLWordPrintable

      With 1.2 a grat new feature was created, library "pipeline templates", which prevents very similar pipelines to be duplicated in many places (a maintenance nightmare, and makes it difficult to enforce organization-wide processes).

      However it still has some limitations (see https://issues.jenkins-ci.org/browse/JENKINS-53658)   One of these, however, is really damaging.

      Currently one cannot use the library pipeline from a declarative pipeline (jenkinsfile for instance) and this error happens:
      java.lang.IllegalStateException: Only one pipeline { ... } block can be executed in a single run.
      This forces the use of scripted pipelines to use them, which undermines the efforts to use preferably declarative ones.

      It would be alright to put some limits on this.  We don't need arbitrary levels of nesting.  But at least being able to call a library declarative pipeline from the main declarative pipeline  should be possible.  Not sure if this simplifies anything in terms of implementation, but could limit use of resources (memory etc.).

            Unassigned Unassigned
            fnasser Fernando Nasser
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: