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

Allow sequential stages inside parallel in Declarative syntax

    • Pipeline - April 2018

      Currently with -JENKINS-41334-, we set one or more stages to be executed in parallel but no "branches". Meaning that we cannot parallelise a sequence of stages.

       

      Example:

      pipeline {
        agent none
        stages {
          stage('Parallel stuff') {
            parallel 'branch 1' : {
              // Sequencial stages
              stage('Branch 1 stage 1'){
                  agent any
                  steps {
                      echo "In branch 1 stage 1"
                  }
              }
              stage('Branch 1 stage 2'){
                  agent none // With that kind of sequencial stage, we can change the agent to run on
                  steps {
                      sleep 30
                  }
              }
            }, 'branch 2': { // Parallel execution
              stage('Branch 2 stage 1'){
                  agent any
                  steps {
                      echo "In branch 2 stage 1"
                      sleep 60
                  }
              }
            }
          }
        }
      }
      

      Blue ocean possible view:

          [JENKINS-46809] Allow sequential stages inside parallel in Declarative syntax

          Bastien Arata created issue -
          Andrew Bayer made changes -
          Issue Type Original: Bug [ 1 ] New: New Feature [ 2 ]
          Andrew Bayer made changes -
          Link New: This issue relates to JENKINS-40986 [ JENKINS-40986 ]
          Andrew Bayer made changes -
          Link New: This issue is duplicated by JENKINS-47532 [ JENKINS-47532 ]
          Andrew Bayer made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Andrew Bayer made changes -
          Remote Link New: This issue links to "PR #227 (Web Link)" [ 18167 ]
          Andrew Bayer made changes -
          Sprint New: Pipeline - December [ 446 ]
          Liam Newman made changes -
          Link New: This issue relates to JENKINS-39119 [ JENKINS-39119 ]
          Hendrik Halkow made changes -
          Link New: This issue is duplicated by JENKINS-48422 [ JENKINS-48422 ]
          Andrew Bayer made changes -
          Link New: This issue relates to JENKINS-39932 [ JENKINS-39932 ]
          Andrew Bayer made changes -
          Link New: This issue is duplicated by JENKINS-43336 [ JENKINS-43336 ]

            abayer Andrew Bayer
            banst Bastien Arata
            Votes:
            66 Vote for this issue
            Watchers:
            103 Start watching this issue

              Created:
              Updated:
              Resolved: