OPENDEV: Add additional parameters to SCM module 24/1424/2
authorrobert.tomczyk <robert.tomczyk@est.tech>
Tue, 18 Jun 2019 16:20:26 +0000 (17:20 +0100)
committerrobert.tomczyk <robert.tomczyk@est.tech>
Tue, 18 Jun 2019 16:28:07 +0000 (17:28 +0100)
The projects should have control about their workspace.
Following parmaters are introduced for git-scm and git-scm-gerrit
to control what should be done with git repository when the
jenkins job is executed:
- wipe_workspace: Wipe out repository and force clone (default: true)
- clean_before: Clean up the workspace before every checkout
  by deleting all untracked files and directories (default: false)

Change-Id: I6216334251d9af8c0c6b9818b2ef3280d6196ef5

23 files changed:
jjb/acumos/global-templates-acumos-java.yaml
jjb/acumos/global-templates-acumos-push-upstream.yaml
jjb/acumos/global-templates-acumos-rebase.yaml
jjb/cloud-infra/cloud-infra-periodic-engine.yaml
jjb/cloud-infra/cloud-infra-periodic-scenario.yaml
jjb/cloud-infra/cloud-infra-verify-engine.yaml
jjb/cloud-infra/cloud-infra-verify-scenario.yaml
jjb/cloud-infra/cloud-infra-verify-testfw.yaml
jjb/global/global-templates-java.yaml
jjb/global/global-templates-push-upstream.yaml
jjb/global/global-templates-rebase.yaml
jjb/global/jjb-macros.yaml
jjb/infra/jjb-merge-jobs.yaml
jjb/infra/jjb-verify-jobs.yaml
jjb/onap/global-templates-onap-java.yaml
jjb/onap/global-templates-onap-push-upstream.yaml
jjb/onap/global-templates-onap-rebase.yaml
jjb/opendaylight/global-templates-opendaylight-push-upstream.yaml
jjb/opendaylight/global-templates-opendaylight-rebase.yaml
jjb/opendev/global-templates-opendev-push-upstream-test.yaml
jjb/opendev/global-templates-opendev-push-upstream.yaml
jjb/opendev/global-templates-opendev-rebase-test.yaml
jjb/opendev/global-templates-opendev-rebase.yaml

index 80344fda92c493a12b59eed28742679c8c03ea63..707f3983632ea3b88cceb99577953ab77d73bdda 100644 (file)
@@ -37,6 +37,8 @@
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-trigger-patchset-created:
index a6b6ccad01e3cb0e66b52151f5f9d700ad156557..2a31aafda168cee2f235197924ac76f503ca2a59 100644 (file)
@@ -21,6 +21,8 @@
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-push-upstream:
index e26e872eacb2d6598305a673335532be6b1210e1..994c9236d9a1b306180e511ae74744d989caaed8 100644 (file)
@@ -25,6 +25,8 @@
           ssh-credentials-id: nordixinfra-lfn-gerrit-ssh
           branch: '{branch}'
           refspec: ''
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - acumos-gerrit-trigger-change-merged:
index 4e0ced5297d9f2c6cceac36e3766a7413095ebb4..c912c05d332b66bf38a0f7ec5812d44f3e17d23c 100644 (file)
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: ''
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - timed: '{build-trigger}'
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: ''
+          wipe_workspace: true
+          clean_before: false
 
     builders:
       - 'cloud-infra-{phase}-macro'
index 1aa58565368dee39035834a41e06b09b96fdcf5d..c1e43456af0ebe63d871c60ab8d474b99a7cc7f4 100644 (file)
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: ''
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - timed: '@daily'
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: ''
+          wipe_workspace: true
+          clean_before: false
 
     builders:
       - description-setter:
index 84908e6451060a364741e846339aa2c9b8d10f25..18f106bb84f59218edc92e4e23e2123bac6ee8b8 100644 (file)
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - gerrit:
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     builders:
       - 'cloud-infra-determine-scenario-macro'
index 37141c9cce92ed2a97bc0e3d20a7f5f29402f9a6..502d40c0652ddfcd81daec0f75273fb7ad0b04b4 100644 (file)
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-trigger-patchset-created:
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     builders:
       - 'cloud-infra-determine-scenario-macro'
index e169b69ca89e068a0a3c32d8b4dae49cf3c96ff8..110705c083fb157d7d6239c5626a4c3bb07b017e 100644 (file)
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-trigger-patchset-created:
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     builders:
       - 'cloud-infra-testfw-macro'
index 53eab0512625370bab30e441750f819bc87c7b87..b3d651e5694bb2244f3d81cfb11b1498e8c5bcf6 100644 (file)
@@ -37,6 +37,8 @@
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-trigger-patchset-created:
index 032a71748a391f08b2b328dd270c6e15a6caa93f..b3c0b483ac3da72fba505c54dbf601f8380bc265 100644 (file)
@@ -21,6 +21,8 @@
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-push-upstream:
index 6ac53a954ff119067ad44387793325775b1a426d..58579421bfd3fe51233da96c5cf916010427b510 100644 (file)
@@ -25,6 +25,8 @@
           ssh-credentials-id: nordixinfra-lfn-gerrit-ssh
           branch: '{branch}'
           refspec: ''
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - onap-gerrit-trigger-change-merged:
index 834b60fd145ee7ad0aac51dbd4b206d2536fa355..b9040e4a4f3e5057be53acde99430730ab616dd5 100644 (file)
           shallow-clone: false
           use-author: false
           ignore-notify: false
-          wipe-workspace: true
+          wipe-workspace: '{wipe_workspace}'
           prune: false
+          clean:
+            after: false
+            before: '{clean_before}'
           choosing-strategy: 'default'
 
 - scm:
           shallow-clone: false
           use-author: false
           ignore-notify: false
-          wipe-workspace: true
+          wipe-workspace: '{wipe_workspace}'
           prune: false
+          clean:
+            after: false
+            before: '{clean_before}'
           choosing-strategy: 'gerrit'
 
 # triggers for Nordix Gerrit
index ccbaf6b2d4c66a43b180e63a4e08eb9c09290315..569be7b7ba0269c8f6a115441439f8d033bdec30 100644 (file)
@@ -37,6 +37,8 @@
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: ''
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-trigger-change-merged:
index 28eca152613dbb2af26e92793c3019f4c69ad56a..043578b6bbf0f2d88e8cff4ffce370cfd1b36b0c 100644 (file)
@@ -37,6 +37,8 @@
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-trigger-patchset-created:
index 5f79175d3d0496016821e5cf78f49755d5502568..0b522b58201e285dcb219be052ae6a4265b07729 100644 (file)
@@ -37,6 +37,8 @@
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-trigger-patchset-created:
index 5e44ed85817205a23560a05ca367ea4222e59322..339da3798c0bb74610cf57bb3b1539fc1df8be7b 100644 (file)
@@ -21,6 +21,8 @@
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-push-upstream:
index 74da77b7a21b282f636c9b1f12fd091bf2e9f5a9..6c297acbe59cdad21b00170b2060d51eeea512b1 100644 (file)
@@ -25,6 +25,8 @@
           ssh-credentials-id: nordixinfra-lfn-gerrit-ssh
           branch: '{branch}'
           refspec: ''
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - onap-gerrit-trigger-change-merged:
index 8a6fd2119dac34639dddbacde708423ebf8480b1..d1e6b500fba81361da6e9b99874dd3d82617411b 100644 (file)
@@ -21,6 +21,8 @@
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-push-upstream:
index b9ee8f0e041421a5f05834cc6a32443e85b79123..0f1c5c7cfb89fdb12a8470ee9ec5f02c5ba4ca7b 100644 (file)
@@ -25,6 +25,8 @@
           ssh-credentials-id: nordixinfra-lfn-gerrit-ssh
           branch: '{branch}'
           refspec: ''
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - odl-gerrit-trigger-change-merged:
index e9d545ef184f2a2e37726163e4afd5417a67c2b9..5b8bfb6127095bf4b34e372dd559d49d33e3ff53 100644 (file)
@@ -22,6 +22,8 @@
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: $GERRIT_BRANCH
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-patchset-created-or-push-upstream:
index addf5f41da03996f66812fccb9212834adcf914f..07200020448fbc6dca0785b93907c4c72bdd8442 100644 (file)
@@ -21,6 +21,8 @@
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
           branch: '{branch}'
           refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - nordix-gerrit-patchset-created-or-push-upstream:
index b96f0b070c79f89824340e522a7b3a9d46a473b0..b915c8b1b11f155e01c2c208dd0a724536516b30 100644 (file)
@@ -26,6 +26,8 @@
           ssh-credentials-id: nordixinfra-lfn-gerrit-ssh
           branch: 'master'
           refspec: ''
+          wipe_workspace: false
+          clean_before: true
 
     triggers:
       - opendev-gerrit-trigger-change-merged:
index c376ed40c389bef498a8bb1e138e9f7a263e45ac..fc5d39150fcd3a3f465173fa76d0ebb01c4f9086 100644 (file)
@@ -25,6 +25,8 @@
           ssh-credentials-id: nordixinfra-lfn-gerrit-ssh
           branch: '{branch}'
           refspec: ''
+          wipe_workspace: true
+          clean_before: false
 
     triggers:
       - opendev-gerrit-trigger-change-merged: