diff --git a/jenkins_jobs/modules/scm.py b/jenkins_jobs/modules/scm.py
index b16187fd2..bd7e0a53f 100644
--- a/jenkins_jobs/modules/scm.py
+++ b/jenkins_jobs/modules/scm.py
@@ -322,6 +322,8 @@ def git(registry, xml_parent, data):
during clone (optional)
* **timeout** (`int`) - Specify a timeout (in minutes) for
submodules operations (default 10).
+ * **threads** (`int`) - Number of parallel processes to be used when
+ updating submodules. Default is to use a single thread for submodule updates.
* **timeout** (`str`) - Timeout for git commands in minutes (optional)
* **use-author** (`bool`): Use author rather than committer in Jenkin's
build changeset (default false)
@@ -675,6 +677,7 @@ def git_extensions(xml_parent, data):
data["submodule"].get("reference-repo", "")
)
XML.SubElement(ext, "timeout").text = str(data["submodule"].get("timeout", 10))
+ XML.SubElement(ext, "threads").text = str(data["submodule"].get("threads", 1))
if "timeout" in data:
ext_name = impl_prefix + "CheckoutOption"
if trait:
diff --git a/tests/macros/fixtures/scm/obj-in-scm-macro001.xml b/tests/macros/fixtures/scm/obj-in-scm-macro001.xml
index 9918f252c..8cbe8834d 100644
--- a/tests/macros/fixtures/scm/obj-in-scm-macro001.xml
+++ b/tests/macros/fixtures/scm/obj-in-scm-macro001.xml
@@ -46,6 +46,7 @@
false
10
+ 1
diff --git a/tests/multibranch/fixtures/scm_bitbucket_full.xml b/tests/multibranch/fixtures/scm_bitbucket_full.xml
index d7e5be355..03b0c867f 100644
--- a/tests/multibranch/fixtures/scm_bitbucket_full.xml
+++ b/tests/multibranch/fixtures/scm_bitbucket_full.xml
@@ -140,6 +140,7 @@
true
100
+ 1
diff --git a/tests/multibranch/fixtures/scm_bitbucket_full.yaml b/tests/multibranch/fixtures/scm_bitbucket_full.yaml
index 4a0906e57..b073ca03a 100644
--- a/tests/multibranch/fixtures/scm_bitbucket_full.yaml
+++ b/tests/multibranch/fixtures/scm_bitbucket_full.yaml
@@ -96,6 +96,7 @@ scm:
recursive: true
parent-credentials: true
timeout: 100
+ threads: 1
timeout: "100"
skip-notifications: true
use-author: true
diff --git a/tests/multibranch/fixtures/scm_git_full.xml b/tests/multibranch/fixtures/scm_git_full.xml
index cec382443..c7393ff12 100644
--- a/tests/multibranch/fixtures/scm_git_full.xml
+++ b/tests/multibranch/fixtures/scm_git_full.xml
@@ -98,6 +98,7 @@
true
100
+ 1
diff --git a/tests/multibranch/fixtures/scm_git_full.yaml b/tests/multibranch/fixtures/scm_git_full.yaml
index 4ba18202a..65e51b761 100644
--- a/tests/multibranch/fixtures/scm_git_full.yaml
+++ b/tests/multibranch/fixtures/scm_git_full.yaml
@@ -85,6 +85,7 @@ scm:
recursive: true
parent-credentials: true
timeout: 100
+ threads: 1
timeout: "100"
use-author: true
wipe-workspace: true
diff --git a/tests/multibranch/fixtures/scm_github_full.xml b/tests/multibranch/fixtures/scm_github_full.xml
index 1bcfcb93a..5dc7ff67f 100644
--- a/tests/multibranch/fixtures/scm_github_full.xml
+++ b/tests/multibranch/fixtures/scm_github_full.xml
@@ -122,6 +122,7 @@
true
100
+ 1
diff --git a/tests/multibranch/fixtures/scm_github_full.yaml b/tests/multibranch/fixtures/scm_github_full.yaml
index 835950281..06d827029 100644
--- a/tests/multibranch/fixtures/scm_github_full.yaml
+++ b/tests/multibranch/fixtures/scm_github_full.yaml
@@ -96,6 +96,7 @@ scm:
recursive: true
parent-credentials: true
timeout: 100
+ threads: 1
timeout: "100"
skip-notifications: true
use-author: true
diff --git a/tests/scm/fixtures/git-submodule01.xml b/tests/scm/fixtures/git-submodule01.xml
index 3d36a7145..c935e6741 100644
--- a/tests/scm/fixtures/git-submodule01.xml
+++ b/tests/scm/fixtures/git-submodule01.xml
@@ -29,6 +29,7 @@
true
/jenkins_home/.gitcache/submodules
15
+ 1
diff --git a/tests/scm/fixtures/git-submodule01.yaml b/tests/scm/fixtures/git-submodule01.yaml
index dc2ab720b..a83851c64 100644
--- a/tests/scm/fixtures/git-submodule01.yaml
+++ b/tests/scm/fixtures/git-submodule01.yaml
@@ -8,3 +8,4 @@ scm:
parent-credentials: true
reference-repo: /jenkins_home/.gitcache/submodules
timeout: 15
+ threads: 1