Skip to content

Add glob template helper function #161

@kcreddy

Description

@kcreddy

The existing file template function reads a file from a full path. For example: {{file ./files/sample.csv}}
But at times, we want the ability to read all files from a folder when file name matches a pattern.
Example, when running integration system benchmarks1, the corpus data generator tool creates sample data file with random suffix in its name 2. The full name is not known, thus it cannot be read using file template function.

Enhancement:
Add glob function template function which can read multiple files matching a pattern.
Example usage: {{glob ./files/corpus-*}}

Footnotes

  1. https://github.com/elastic/elastic-package/blob/main/docs%2Fhowto%2Fsystem_benchmarking.md

  2. https://github.com/elastic/elastic-package/blob/b2d0ec808c504a2c6e8bc9fefa6fff866c208c8b/internal/benchrunner/runners/system/runner.go#L589

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions