Support for follow-symlinks in archive publisher

Change-Id: I1d5bd1c6ef5ccdf5f304dabf3a9afcb59d2b2baf
This commit is contained in:
Piotr Falkowski 2023-01-16 22:06:49 +01:00
parent 0e1b708ad5
commit 927bb1919b
11 changed files with 12 additions and 1 deletions

View File

@ -144,6 +144,8 @@ def archive(registry, xml_parent, data):
successful build successful build
:arg bool allow-empty: pass the build if no artifacts are :arg bool allow-empty: pass the build if no artifacts are
found (default false) found (default false)
:arg bool follow-symlinks: follow symbolic links during archiving
(default false)
:arg bool only-if-success: archive artifacts only if build is successful :arg bool only-if-success: archive artifacts only if build is successful
(default false) (default false)
:arg bool fingerprint: fingerprint all archived artifacts (default false) :arg bool fingerprint: fingerprint all archived artifacts (default false)
@ -166,6 +168,7 @@ def archive(registry, xml_parent, data):
("default-excludes", "defaultExcludes", True), ("default-excludes", "defaultExcludes", True),
("case-sensitive", "caseSensitive", True), ("case-sensitive", "caseSensitive", True),
("latest-only", "latestOnly", False), ("latest-only", "latestOnly", False),
("follow-symlinks", "followSymlinks", False),
] ]
if "excludes" in data: if "excludes" in data:

0
tests/__init__.py Normal file
View File

View File

@ -9,6 +9,7 @@
<defaultExcludes>false</defaultExcludes> <defaultExcludes>false</defaultExcludes>
<caseSensitive>true</caseSensitive> <caseSensitive>true</caseSensitive>
<latestOnly>false</latestOnly> <latestOnly>false</latestOnly>
<followSymlinks>false</followSymlinks>
</hudson.tasks.ArtifactArchiver> </hudson.tasks.ArtifactArchiver>
</publishers> </publishers>
</project> </project>

View File

@ -9,6 +9,7 @@
<defaultExcludes>true</defaultExcludes> <defaultExcludes>true</defaultExcludes>
<caseSensitive>true</caseSensitive> <caseSensitive>true</caseSensitive>
<latestOnly>false</latestOnly> <latestOnly>false</latestOnly>
<followSymlinks>false</followSymlinks>
<excludes>path</excludes> <excludes>path</excludes>
</hudson.tasks.ArtifactArchiver> </hudson.tasks.ArtifactArchiver>
</publishers> </publishers>

View File

@ -9,6 +9,7 @@
<defaultExcludes>true</defaultExcludes> <defaultExcludes>true</defaultExcludes>
<caseSensitive>false</caseSensitive> <caseSensitive>false</caseSensitive>
<latestOnly>false</latestOnly> <latestOnly>false</latestOnly>
<followSymlinks>true</followSymlinks>
</hudson.tasks.ArtifactArchiver> </hudson.tasks.ArtifactArchiver>
</publishers> </publishers>
</project> </project>

View File

@ -5,3 +5,4 @@ publishers:
only-if-success: 'false' only-if-success: 'false'
fingerprint: true fingerprint: true
case-sensitive: false case-sensitive: false
follow-symlinks: true

View File

@ -27,6 +27,7 @@
<defaultExcludes>true</defaultExcludes> <defaultExcludes>true</defaultExcludes>
<caseSensitive>true</caseSensitive> <caseSensitive>true</caseSensitive>
<latestOnly>false</latestOnly> <latestOnly>false</latestOnly>
<followSymlinks>false</followSymlinks>
</publisher> </publisher>
</org.jenkins__ci.plugins.flexible__publish.ConditionalPublisher> </org.jenkins__ci.plugins.flexible__publish.ConditionalPublisher>
</publishers> </publishers>

View File

@ -15,6 +15,7 @@
<defaultExcludes>true</defaultExcludes> <defaultExcludes>true</defaultExcludes>
<caseSensitive>true</caseSensitive> <caseSensitive>true</caseSensitive>
<latestOnly>false</latestOnly> <latestOnly>false</latestOnly>
<followSymlinks>false</followSymlinks>
</hudson.tasks.ArtifactArchiver> </hudson.tasks.ArtifactArchiver>
<hudson.tasks.test.AggregatedTestResultPublisher> <hudson.tasks.test.AggregatedTestResultPublisher>
<includeFailedBuilds>true</includeFailedBuilds> <includeFailedBuilds>true</includeFailedBuilds>

View File

@ -17,6 +17,7 @@
<defaultExcludes>true</defaultExcludes> <defaultExcludes>true</defaultExcludes>
<caseSensitive>true</caseSensitive> <caseSensitive>true</caseSensitive>
<latestOnly>false</latestOnly> <latestOnly>false</latestOnly>
<followSymlinks>false</followSymlinks>
</publisher> </publisher>
</org.jenkins__ci.plugins.flexible__publish.ConditionalPublisher> </org.jenkins__ci.plugins.flexible__publish.ConditionalPublisher>
</publishers> </publishers>

View File

@ -16,6 +16,7 @@
<defaultExcludes>true</defaultExcludes> <defaultExcludes>true</defaultExcludes>
<caseSensitive>true</caseSensitive> <caseSensitive>true</caseSensitive>
<latestOnly>false</latestOnly> <latestOnly>false</latestOnly>
<followSymlinks>false</followSymlinks>
</hudson.tasks.ArtifactArchiver> </hudson.tasks.ArtifactArchiver>
</publisherList> </publisherList>
</org.jenkins__ci.plugins.flexible__publish.ConditionalPublisher> </org.jenkins__ci.plugins.flexible__publish.ConditionalPublisher>

View File

@ -23,7 +23,7 @@ commands =
# test that we can call jjb using both variants with same results # test that we can call jjb using both variants with same results
bash {toxinidir}/tools/test-commands.sh bash {toxinidir}/tools/test-commands.sh
pytest {posargs} pytest {posargs}
whitelist_externals = allowlist_externals =
bash bash
find find