Multibranch pipeline 'checkout scm' does not handle Git submodules

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

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
      

            Assignee:
            Unassigned
            Reporter:
            Colin Bennett
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: