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

Multibranch pipeline 'checkout scm' does not handle Git submodules

XMLWordPrintable

      When using a Multibranch Pipeline job type, the Jenkinsfile in the SCM repository branch being built contains the statement checkout scm. But if the Git repository contains submodules, they are not initialized or updated in the Jenkins build workspace.

      Typically submodule initialization/updating is automatically handled by the Git SCM for Jenkins Freestyle jobs.

      Workaround

      You can call the git executable manually from the Jenkinsfile pipeline DSL, like this:

              checkout scm
              bat 'git submodule update --init'     // or sh
      

            Unassigned Unassigned
            cbennett Colin Bennett
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: