title: Jenkins declarative pipeline: Sequential execution of an axis of a matrix-build
body: <p>I am trying to set up a matrix build and am running in several issues.
  The matrix looks like:</p>
  
  <pre><code>stage( 'BuildAll' ) {
      matrix {
          axes {
              axis {
                  name 'PLATFORM'
                  values 'win32vc9', 'win32vc19' 
              }                   
              axis {
                  name 'VARIANT'
                  values 'debug', 'release'                   
              }
              axis {
                  name 'MODULES'
                  values 'repo1/module1', 'repo1/module2', 'repo2/module1', 'repo2/module2'
              }
          }
  
          stages {                                                
              stage( 'Checkout' ) {
              }
              stage( 'Build' ) {
              }
              stage( 'Test' ) {
              }
         }
  </code></pre>
  
  <p>The issue I have:</p>
  
  <ul>
  <li><p>jenkins is executing every cell of the matrix in it's own workspace but my modules depend on each other. That's why I want do check them out and build them in the same workspace. BTW: my build system is made to work with all the variants (debug/release x vc9/vc19) in the same workspace.</p></li>
  <li><p>jenkins is executing all the cells in parallel. What I need, is a serialization of execution of the MODULES axis.</p></li>
  </ul>
  
  <p>Any ideas how I can work around this?</p>
  
  <p>E.g. is there a way to descripe something like a loop over several modules that generates a sequence of stages in a row, not parallel? Within that sequence I could realize the matrix over 2 axes only.</p>
  
  <p>I am aware of extended workspace plugin but did not find any documentation of how to use this in declarative pipelines.</p>
  
  <p>Many thanks in advance!
  Regards,
  Christoph</p>