Add support for clean-first parameter of repo scm

The repo plugin supports 'cleanFirst' since plugin v1.11.0

  9c7e81cbf0

Add support inside jenkins-job-builder to set that value.

Change-Id: Ifae1bad0f0fb4a56fc0f030038eefbcc8cd4ad6f
This commit is contained in:
Luca Weiss 2024-04-24 15:44:39 +02:00
parent 667402cc83
commit 2b166cff8a
4 changed files with 7 additions and 0 deletions

View File

@ -942,6 +942,9 @@ def repo(registry, xml_parent, data):
:arg bool reset-first: Remove any commits that are not on the repositories
by running the following command before anything else (default false):
``repo forall -c "git reset --hard"``
:arg bool clean-first: Remove any files that are not tracked in the repositories
by running the following command before anything else (default false):
``repo forall -c "git clean -fdx"``
:arg bool quiet: Make repo more quiet
(default true)
:arg bool force-sync: Continue sync even if a project fails to sync
@ -968,6 +971,7 @@ def repo(registry, xml_parent, data):
("depth", "depth", 0),
("current-branch", "currentBranch", True),
("reset-first", "resetFirst", False),
("clean-first", "cleanFirst", False),
("quiet", "quiet", True),
("force-sync", "forceSync", False),
("no-tags", "noTags", False),

View File

@ -16,6 +16,7 @@
<depth>2</depth>
<currentBranch>false</currentBranch>
<resetFirst>false</resetFirst>
<cleanFirst>false</cleanFirst>
<quiet>false</quiet>
<forceSync>false</forceSync>
<noTags>false</noTags>

View File

@ -6,6 +6,7 @@
<depth>0</depth>
<currentBranch>false</currentBranch>
<resetFirst>true</resetFirst>
<cleanFirst>true</cleanFirst>
<quiet>false</quiet>
<forceSync>true</forceSync>
<noTags>true</noTags>

View File

@ -13,6 +13,7 @@ scm:
jobs: 3
current-branch: false
reset-first: true
clean-first: true
quiet: false
force-sync: true
no-tags: true