Add support for default-excludes in archives

Change-Id: I0a2339cc663d2c55fcf063eb0042b9581be93d2c
Signed-off-by: Kien Ha <kienha9922@gmail.com>
This commit is contained in:
Kien Ha 2015-12-18 20:00:22 -05:00
parent 245f643522
commit 4ef069cc27
8 changed files with 16 additions and 4 deletions

View File

@ -55,14 +55,16 @@ def archive(parser, xml_parent, data):
Archive build artifacts
:arg str artifacts: path specifier for artifacts to archive
:arg str excludes: path specifier for artifacts to exclude
:arg str excludes: path specifier for artifacts to exclude (optional)
:arg bool latest-only: only keep the artifacts from the latest
successful build
successful build
:arg bool allow-empty: pass the build if no artifacts are
found (default false)
found (default false)
: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 default-excludes: This option allows to enable or disable the
default Ant exclusions. (default true)
Example:
@ -101,6 +103,9 @@ def archive(parser, xml_parent, data):
fingerprint = XML.SubElement(archiver, 'fingerprint')
fingerprint.text = str(data.get('fingerprint', False)).lower()
default_excludes = XML.SubElement(archiver, 'defaultExcludes')
default_excludes.text = str(data.get('default-excludes', True)).lower()
def blame_upstream(parser, xml_parent, data):
"""yaml: blame-upstream

View File

@ -6,6 +6,7 @@
<latestOnly>false</latestOnly>
<allowEmptyArchive>true</allowEmptyArchive>
<fingerprint>true</fingerprint>
<defaultExcludes>false</defaultExcludes>
</hudson.tasks.ArtifactArchiver>
</publishers>
</project>

View File

@ -3,3 +3,4 @@ publishers:
artifacts: '*.tar.gz'
allow-empty: 'true'
fingerprint: true
default-excludes: false

View File

@ -7,6 +7,7 @@
<allowEmptyArchive>true</allowEmptyArchive>
<onlyIfSuccessful>true</onlyIfSuccessful>
<fingerprint>true</fingerprint>
<defaultExcludes>true</defaultExcludes>
</hudson.tasks.ArtifactArchiver>
</publishers>
</project>

View File

@ -7,6 +7,7 @@
<allowEmptyArchive>true</allowEmptyArchive>
<onlyIfSuccessful>false</onlyIfSuccessful>
<fingerprint>true</fingerprint>
<defaultExcludes>true</defaultExcludes>
</hudson.tasks.ArtifactArchiver>
</publishers>
</project>

View File

@ -23,6 +23,7 @@
<artifacts>**/**</artifacts>
<latestOnly>false</latestOnly>
<allowEmptyArchive>true</allowEmptyArchive>
<defaultExcludes>true</defaultExcludes>
</publisher>
</org.jenkins__ci.plugins.flexible__publish.ConditionalPublisher>
</publishers>

View File

@ -11,6 +11,7 @@
<artifacts>**/**</artifacts>
<latestOnly>false</latestOnly>
<allowEmptyArchive>true</allowEmptyArchive>
<defaultExcludes>true</defaultExcludes>
</hudson.tasks.ArtifactArchiver>
<hudson.tasks.test.AggregatedTestResultPublisher>
<includeFailedBuilds>true</includeFailedBuilds>

View File

@ -13,6 +13,7 @@
<artifacts>**/**</artifacts>
<latestOnly>false</latestOnly>
<allowEmptyArchive>true</allowEmptyArchive>
<defaultExcludes>true</defaultExcludes>
</publisher>
</org.jenkins__ci.plugins.flexible__publish.ConditionalPublisher>
</publishers>