Add submodule-disable for submodule operations 97/15497/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Tue, 23 Apr 2019 17:03:58 +0000 (19:03 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 3 May 2019 13:16:38 +0000 (15:16 +0200)
Some Akraino projects using git scm have a large number of submodules
which are not required during most CI/CD operations (e.g. we don't
want to fetch GBs of 3rd party repositories when linting the code).

Add submodule-disable parameter for both lf-infra-gerrit-scm
and lf-infra-github-scm, allowing us to disable submodule fetching
where needed.

Jenkins git plugin support for this was added in [1].

This change is very similar and mostly based on the addition of the
submodule-timeout parameter in commit 9fdb611f1.

[1] https://issues.jenkins-ci.org/browse/JENKINS-6658

Change-Id: Ia99ba7f353a39e55d7bec57778f447f94402b5e6
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
18 files changed:
docs/jjb/lf-c-cpp-jobs.rst
docs/jjb/lf-ci-jobs.rst
docs/jjb/lf-macros.rst
docs/jjb/lf-maven-jobs.rst
docs/jjb/lf-node-jobs.rst
docs/jjb/lf-python-jobs.rst
docs/jjb/lf-rtd-jobs.rst
docs/jjb/lf-whitesource-jobs.rst
jjb/lf-c-cpp-jobs.yaml
jjb/lf-ci-jobs.yaml
jjb/lf-info-vote.yaml
jjb/lf-macros.yaml
jjb/lf-maven-jobs.yaml
jjb/lf-node-jobs.yaml
jjb/lf-python-jobs.yaml
jjb/lf-rtd-jobs.yaml
jjb/lf-whitesource-jobs.yaml
releasenotes/notes/submodule-disable-007e41e593d9b11c.yaml [new file with mode: 0644]

index 0e01491..03372c0 100644 (file)
@@ -57,6 +57,8 @@ to support multi-branch.
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_sonar_triggers: Override Gerrit Triggers.
 
@@ -111,6 +113,8 @@ project into a tar.xz tarball to produce a release candidate.
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
     :version: (default: '') Project version to stage release as. There are 2
         methods for using this value:
 
@@ -175,6 +179,8 @@ Verify job which runs cmake && make && make install to test a project build..
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_verify_triggers: Override Gerrit Triggers.
     :gerrit_trigger_file_paths: Override file paths which to filter which file
index 5ad9b6a..bd477b9 100644 (file)
@@ -139,6 +139,8 @@ Job submits a patch to lock or unlock a project's branch.
         Often the same as the branch. (default: master)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
     :gerrit_merge_triggers: Override Gerrit Triggers.
 
 .. _lf-global-jjb-jenkins-cfg-merge:
@@ -433,6 +435,8 @@ Runs `jenkins-jobs update` to update production job configuration
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_merge_triggers: Override Gerrit Triggers.
     :gerrit_trigger_file_paths: Override file paths which can be used to
@@ -476,6 +480,8 @@ Runs `jenkins-jobs test` to validate JJB syntax
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
     :throttle_categories: List of categories to throttle by.
     :throttle-enabled: Whether or not to enable throttling on the job.
         (default: true)
@@ -555,6 +561,8 @@ other file changes. Verifies INFO.yaml files follow the schema defined in
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_verify_triggers: Override Gerrit Triggers.
 
@@ -638,6 +646,8 @@ containing the credentials for the cloud.
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
 Minimal Example:
 
@@ -693,6 +703,8 @@ Packer Merge job runs `packer build` to build system images in the cloud.
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_verify_triggers: Override Gerrit Triggers.
 
@@ -750,6 +762,8 @@ Packer Verify job runs `packer validate` to verify packer configuration.
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_verify_triggers: Override Gerrit Triggers.
     :gerrit_trigger_file_paths: Override file paths which can be used to
@@ -797,3 +811,5 @@ the base directory is usually the best place to run from.
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
index 133795e..2471b98 100644 (file)
@@ -356,6 +356,8 @@ Basic SCM configuration for Gerrit based projects.
 
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
 lf-infra-github-scm
 -------------------
@@ -370,6 +372,8 @@ the GHPRB plugin and not manually.
 
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
 Wrappers
 ========
index 1a0dc1e..48a688e 100644 (file)
@@ -141,6 +141,8 @@ Produces a CLM scan of the code into Nexus IQ Server.
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_merge_triggers: Override Gerrit Triggers.
 
@@ -187,6 +189,8 @@ Expects javadocs to be available in $WORKSPACE/target/site/apidocs
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_merge_triggers: Override Gerrit Triggers.
 
@@ -230,6 +234,8 @@ Expects javadocs to be available in $WORKSPACE/target/site/apidocs
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_verify_triggers: Override Gerrit Triggers.
 
@@ -292,6 +298,9 @@ This job uses the following strategy to deploy jobs to Nexus:
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
+
     :gerrit_merge_triggers: Override Gerrit Triggers.
     :gerrit_trigger_file_paths: Override file paths which can be used to
         filter which file modifications will trigger a build.
@@ -380,6 +389,8 @@ directory is then used later to deploy to Nexus.
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_release_triggers: Override Gerrit Triggers.
 
@@ -466,6 +477,8 @@ interest in that kind of support.
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_sonar_triggers: Override Gerrit Triggers.
 
@@ -513,6 +526,8 @@ Verify job which runs mvn clean install to test a project build..
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_verify_triggers: Override Gerrit Triggers.
     :gerrit_trigger_file_paths: Override file paths which can be used to
@@ -580,6 +595,8 @@ via comment trigger.
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_verify_triggers: Override Gerrit Triggers.
     :gerrit_trigger_file_paths: Override file paths which can be used to
index 38c7dee..8cf3af0 100644 (file)
@@ -50,6 +50,8 @@ Verify job for NodeJS projects
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_verify_triggers: Override Gerrit Triggers.
     :gerrit_trigger_file_paths: Override file paths filter which checks which
index 0244614..2845e06 100644 (file)
@@ -101,6 +101,8 @@ IQ Server.
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
     :gerrit_clm_triggers: Override Gerrit Triggers.
     :gerrit_trigger_file_paths: Override file paths which used to filter which
         file modifications will trigger a build. Refer to JJB documentation for
@@ -172,6 +174,8 @@ https://docs.sonarqube.org/display/PLUG/Python+Coverage+Results+Import
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
     :gerrit_sonar_triggers: Override Gerrit Triggers.
     :gerrit_trigger_file_paths: Override file paths which used to filter which
         file modifications will trigger a build. Refer to JJB documentation for
@@ -220,6 +224,8 @@ following pyenv variables before running.
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
     :tox-dir: Directory containing the project's tox.ini relative to
         the workspace. Empty works if tox.ini is at project root.
         (default: '')
index c5c9172..c983b58 100644 (file)
@@ -82,6 +82,8 @@ ReadTheDocs. To do that follow these steps:
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_merge_triggers: Override Gerrit Triggers.
     :gerrit_trigger_file_paths: Override file paths filter which checks which
@@ -129,6 +131,8 @@ Verify job which runs a tox build of the docs project
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
 
     :gerrit_verify_triggers: Override Gerrit Triggers.
     :gerrit_trigger_file_paths: Override file paths filter which checks which
index dd8fda3..641cfc3 100644 (file)
@@ -59,6 +59,8 @@ https://s3.amazonaws.com/unified-agent/wss-unified-agent.config
         (default: true)
     :submodule-timeout: Timeout (in minutes) for checkout operation.
         (default: 10)
+    :submodule-disable: Disable submodule checkout operation.
+        (default: false)
     :wss-unified-agent-version: WhiteSource Unified Agent version package to download
         and use.
     :gerrit_trigger_file_paths: Override file paths which used to filter which
index 2eb394e..9dfc447 100644 (file)
@@ -28,6 +28,7 @@
     sonarcloud-project-key: ''
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     #####################
     # Job Configuration #
@@ -89,6 +90,7 @@
           refspec: '$GERRIT_REFSPEC'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
 
     triggers:
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
     version: ''
 
     #####################
           refspec: '$GERRIT_REFSPEC'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
 
     triggers:
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_verify_triggers:
       - patchset-created-event:
           refspec: '$GERRIT_REFSPEC'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
 
     triggers:
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
index 5019cb9..b2eb383 100644 (file)
@@ -37,6 +37,7 @@
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
     packer-cloud-settings: packer-cloud-env
     packer-version: 1.4.0
 
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
     throttle_categories: []
     throttle-enabled: false
     throttle-max-per-node: 1
     git-url: '$GIT_URL/$GERRIT_PROJECT'
     stream: master
     submodule-timeout: 10
+    submodule-disable: false
     gerrit_merge_triggers:
       - comment-added-contains-event:
           comment-contains-value: (un)?lock branch$
           branch: '{branch}'
           submodule-recursive: false
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     github-url: 'https://github.com'
     jenkins-silos: production sandbox
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_merge_triggers:
       - change-merged-event
           branch: '{branch}'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: 'refs/heads/{branch}'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     github-url: 'https://github.com'
     openstack-cloud: vex
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_verify_triggers:
       - patchset-created-event:
           branch: '$GERRIT_BRANCH'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '$sha1'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     github-url: 'https://github.com'
     stream: master
     submodule-timeout: 10
+    submodule-disable: false
     gerrit_jjb_deploy_job_triggers:
       - comment-added-contains-event:
           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(jjb-deploy[:]* (?!\*+$).+$)'
           branch: '{branch}'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '$sha1'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '{branch}'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: 'refs/heads/{branch}'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
 
     git-url: '$GIT_URL/$PROJECT'
     submodule-timeout: 10
+    submodule-disable: false
 
     #####################
     # Job Configuration #
           branch: 'master'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     spdx-disable: false
     stream: master
     submodule-timeout: 10
+    submodule-disable: false
 
     #####################
     # Job Configuration #
           # Submodules are out of the project's control
           submodule-recursive: false
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           # Submodules are out of the project's control
           submodule-recursive: false
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     openstack-volume-cleanup: true
     stream: master
     submodule-timeout: 10
+    submodule-disable: false
 
     #####################
     # Job Configuration #
           branch: '{branch}'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: 'refs/heads/{branch}'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '$GERRIT_REFSPEC'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_trigger_file_paths:
       - compare-type: REG_EXP
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
 
     triggers:
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
index 3c421aa..57dc63b 100644 (file)
@@ -47,6 +47,7 @@
     disable-job: false
     git-url: '$GIT_URL/$PROJECT'
     submodule-timeout: 10
+    submodule-disable: false
     submodule-recursive: true
     gerrit-skip-vote: false
 
@@ -85,6 +86,7 @@
           refspec: '$GERRIT_REFSPEC'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
 
     triggers:
index e393393..6804f48 100644 (file)
           skip-tag: true
           wipe-workspace: true
           submodule:
+            disable: '{submodule-disable}'
             recursive: '{submodule-recursive}'
             timeout: '{submodule-timeout}'
           choosing-strategy: '{choosing-strategy}'
           skip-tag: true
           wipe-workspace: true
           submodule:
+            disable: '{submodule-disable}'
             recursive: '{submodule-recursive}'
             timeout: '{submodule-timeout}'
           choosing-strategy: '{choosing-strategy}'
index 2e35245..349ad64 100644 (file)
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     nexus_iq_scan_patterns:
       - '**/*.ear'
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     triggers:
           branch: 'refs/heads/{branch}'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_merge_triggers:
       - change-merged-event
           branch: '{branch}'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '{branch}'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_verify_triggers:
       - patchset-created-event:
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
 
     triggers:
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_merge_triggers:
       - change-merged-event
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     triggers:
           branch: 'refs/heads/{branch}'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     triggers:
           branch: 'refs/heads/{branch}'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_release_triggers:
       - comment-added-contains-event:
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     triggers:
           branch: '{branch}'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     triggers:
           branch: '{branch}'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_sonar_triggers:
       - comment-added-contains-event:
           branch: $GERRIT_BRANCH
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
 - job-template:
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_verify_triggers:
       - patchset-created-event:
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
 
     triggers:
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
 
     triggers:
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_verify_triggers:
       - comment-added-contains-event:
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
 
     triggers:
index 21f0fb5..b1e0cbd 100644 (file)
@@ -21,6 +21,7 @@
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_trigger_file_paths:
       - compare-type: REG_EXP
@@ -95,6 +96,7 @@
           branch: 'origin/$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
 
     triggers:
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
index dfd4d34..8240845 100644 (file)
@@ -81,6 +81,7 @@
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_trigger_file_paths:
       - compare-type: ANT
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     triggers:
           branch: 'refs/heads/{branch}'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
 
     gerrit_trigger_file_paths:
       - compare-type: REG_EXP
           branch: $GERRIT_BRANCH
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     triggers:
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
     tox-dir: ''
     tox-envs: ''
 
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: gerrit
 
     triggers:
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
index 9f686e2..110f4ba 100644 (file)
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
     gerrit-skip-vote: false
 
     gerrit_verify_triggers:
           refspec: ''  # Leave blank!! A later script will handle fetching
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     triggers:
           branch: '$sha1'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
index b7c3672..8fade15 100644 (file)
@@ -99,6 +99,7 @@
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
+    submodule-disable: false
     wss-unified-agent-opts: ''
     wss-unified-agent-version: 19.2.2.2
 
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     triggers:
           branch: 'refs/heads/{branch}'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
diff --git a/releasenotes/notes/submodule-disable-007e41e593d9b11c.yaml b/releasenotes/notes/submodule-disable-007e41e593d9b11c.yaml
new file mode 100644 (file)
index 0000000..5a2774b
--- /dev/null
@@ -0,0 +1,16 @@
+---
+features:
+  - |
+    **lf-infra-gerrit-scm** and **lf-infra-github-scm** now require a
+    ``submodule-disable`` parameter (bool) to control whether submodules
+    are ignored or not during git fetch operations.
+  - |
+    All job-templates now provide an optional ``submodule-disable`` parameter
+    for git fetch operations, defaulting to ``false``.
+
+upgrade:
+  - |
+    Any project using the **lf-infra-gerrit-scm** and **lf-infra-github-scm**
+    macros in global-jjb should need to add a ``submodule-disable`` value. It
+    is recommended to default this value to ``false`` since it is the
+    default used by the Jenkins Git Plugin.