I'm looking for a nice way to snapshot the output of a directory from a process output.
The aim would be to recursively output the files in a directory and put either the name or the md5 depending on patterns.
For the moment I'm doing:
{
def stable_name = getAllFilesFromDir(process.out.db[0][1].toString(), include:['*', '**/*'])
def stable_content = getAllFilesFromDir(process.out.db[0][1].toString(), include:["**/VERSION", "**/animal_mt.fasta"])
assert snapshot(
stable_name*.name.sort(),
stable_content,
process.out.findAll { key, val -> key.startsWith('versions') }
).match()
}
My aim would be to have something like:
{ assert snapshot(sanitizeOutput(
process.out,
recursiveKeys: ["db"],
stableFiles: ["**/VERSION", "**/animal_mt.fasta"]
).match() }
I'm looking for a nice way to snapshot the output of a directory from a process output.
The aim would be to recursively output the files in a directory and put either the name or the md5 depending on patterns.
For the moment I'm doing:
My aim would be to have something like: