@@ -86,7 +86,7 @@ String get_submodule_commit(String working_dir = '.', String submodule) {
8686 ). trim()
8787}
8888
89- void checkout_framework_repo (BranchInfo info ) {
89+ private void checkout_framework_repo (BranchInfo info ) {
9090 if (env. TARGET_REPO == ' framework' && env. CHECKOUT_METHOD == ' scm' ) {
9191 checkout_report_errors(scm)
9292 } else {
@@ -104,7 +104,7 @@ void checkout_framework_repo(BranchInfo info) {
104104 }
105105}
106106
107- void checkout_tf_psa_crypto_repo (BranchInfo info ) {
107+ private void checkout_tf_psa_crypto_repo (BranchInfo info ) {
108108 if (env. TARGET_REPO == ' tf-psa-crypto' && env. CHECKOUT_METHOD == ' scm' ) {
109109 checkout_report_errors(scm)
110110 if (! info. framework_override) {
@@ -140,7 +140,7 @@ void checkout_tf_psa_crypto_repo(BranchInfo info) {
140140 }
141141}
142142
143- Map<String , String > checkout_tls_repo (BranchInfo info ) {
143+ private Map<String , String > checkout_tls_repo (BranchInfo info ) {
144144 if (info. repo != ' tls' ) {
145145 throw new IllegalArgumentException (" checkout_tls_repo() called with BranchInfo for repo '$info . repo '" )
146146 }
@@ -188,6 +188,19 @@ void checkout_repo(BranchInfo info) {
188188 error(" Invalid repo: ${ info.repo} " )
189189 }
190190
191+ echo ' Clone all remaining submodules without dedicated handlers'
192+ sh '''
193+ # Initialize submodule variables (required by `git submodule status`)
194+ git submodule init
195+ git submodule foreach 'git submodule init'
196+
197+ # Get list of missing submodules (lines starting with '-')
198+ missing_submodules=$(git submodule status --recursive | awk '/^-/{print $2}')
199+ for module in $missing_submodules; do
200+ git -C "$module" submodule update --recursive --init --depth=1 .
201+ done
202+ '''
203+
191204 stash name : stashName, includes : ' **/*' , useDefaultExcludes : false
192205 info. stash = stashName
193206 needUnstash = false
0 commit comments