Overview
Directory artifacts are used to capture multiple files nested underneath a specified base directory. The files to capture are specified using Apache Ant
style include and exclude patterns. The files captured need not be directly within the base directory, rather they may be nested at an arbitrary depth.
One use for directory artifacts is to capture HTML reports generated as part of the build. Pulse will detect if an index file is present (with name index.html, index.htm, default.html or default.htm) and will present the artifact in the web interface as appropriate.
You may also apply post-processors to directory artifacts. The post-processor is applied to each file captured as part of the artifact as they captured. This allow you to, for example, capture a directory of test reports and apply a JUnit report post-processor to them to integrate test result into the build.
Configuring
Base Directory
Directory artifacts specify a base directory to capture, relative to the base directory for the build. All files to be captured must be nested somewhere underneath this directory (possibly in a subdirectory). It is best to choose the most specific directory possible as it will make capturing more efficient.
Inclusion Patterns
The files to capture are specified as Ant-style patterns. Files matching any one of these patterns will be included in the artifact (unless excluded, see below). The pattern syntax is described on the dir-artifact page. Briefly:
- ? matches any single character.
- * matches any string of characters (including the empty string) within a single directory or filename, but does not match multiple path elements.
- ** matches any string of characters, possibly including multiple path elements.
Exclusions
You may also specify Ant-style patterns for files to be exluded from the artifact. Files matching any one of these patterns will not be included in the artifact, even if they match an inclusion pattern. The pattern syntax is described on the dir-artifact page.