The same parallel scripted and declarative pipelines rendered differently

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Hello, I'm trying to migrate my Declarative pipelines to scripted ones and cannot reproduce behavior completely.

      In order to visualize issue I created 2 identical pipelines defined in a scripted way and in a declarative way.

       

      Scripted:

      node {
          stage("Build") {
              parallel([
                  "Android":{ stage("Android"){ stage("a"){ echo "x" }; stage("a1"){ echo "x" }}},
                  "iOS":{ stage("iOS"){stage("b"){ echo "x" }; stage("a2"){ echo "x" }}}
              ])
          }
      }
      

      Declarative:

      pipeline {
          agent any
          stages {
              stage('Build') {
                  failFast true
                  parallel {
                      stage('Android') {
                          stages {
                              stage('a') { steps { echo "x"} }
                              stage('a1') { steps { echo "x"} }
                          }
                      }
                      stage('iOS') {
                          stages {
                              stage('b') { steps { echo "x"} }
                              stage('b1') { steps { echo "x"} }
                          }
                      }
                  }
              }
          }
      }
      

       

        1. declarative.log
          1 kB
          Taras Postument
        2. declarative.png
          23 kB
          Taras Postument
        3. scripted.log
          1 kB
          Taras Postument
        4. scripted.png
          22 kB
          Taras Postument

            Assignee:
            Unassigned
            Reporter:
            Taras Postument
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: