diff --git a/vars/helper.groovy b/vars/helper.groovy
index a4d5abab1c9cce8790fbcc79b19601bcec6367e3..fd759610392d7823dce0f6477d80deda90077379 100644
--- a/vars/helper.groovy
+++ b/vars/helper.groovy
@@ -60,6 +60,7 @@ def doPrepare(boolean checkoutScm, String gitUrl='') {
   if(checkoutScm) {
     if(gitUrl != '') {
       git gitUrl
+      sh 'git submodule update --init --recursive'
     }
     else {
       checkout scm