title: Implicitly loading submodules in Jenkins pipeline stages
body: <p>Is there a way to modify a Jenkins pipeline script using Git repositories to automatically init submodules?</p>
  
  <pre><code>pipeline {
   stages {
    stage('Something A') {
      steps {
        sh 'git submodule update --init'
        // stuff
      }
    }
    stage('Something B') {
      steps {
        sh 'git submodule update --init'
        // stuff
      }
    }
   }
  }
  </code></pre>
  
  <p>Should preferably be updated to something like</p>
  
  <pre><code>pipeline {
   options { submodule auto }
   stages {
    stage('Something A') {
      steps {
        // stuff
      }
    }
    stage('Something B') {
      steps {
        // stuff
      }
    }
   }
  }
  </code></pre>
  
  <p>Is there an implemented way of doing this? I couldn't find any.</p>