Hi,
I'm working with a pipeline that builds a bunch of npm packages in a monorepo. Our commands are run on each package individually, so we have individual test/lint results in each package. I'm trying to pull all of the results into a single html report. To make this easier, I'm copying the reports into a central folder, and trying to build the report from there:
pipelineContext.echo "Publishing jest results"
pipelineContext.sh
(script: 'mkdir coverage-results'
)
List
<String
> reportTitles =
[]
changeSet.each
{
String coverageDir = it.packageJson.name.replace
('/', '_'
)
pipelineContext.sh
(script:
"mkdir -p coverage-results/$
{coverageDir
}")
pipelineContext.sh
(script:
"cp -R $
{it.path
}/coverage/lcov-report/* coverage-results/$
{coverageDir
}")
reportTitles <<
"'$
{it.packageJson.name}'
"
}
pipelineContext.publishHTML
(
target:
[allowMissing : false,
alwaysLinkToLastBuild: true,
keepAll : true,
reportDir : 'coverage-results/**/*',
reportFiles : 'index.html',
includes : '**/*,**/**/*',
reportName : 'Jest Coverage',
reportTitles : reportTitles.join
(','
)]
)The issue I'm having is that for some reason, it's not seeing the folder, I guess?
ERROR: Specified HTML directory '/home/****rh/workspace/ckages_task_test-jest-publishing/coverage-results/**/*' does not exist.
I went into our build node and checked, and that directory does exist, so I'm unsure where my issue lies.
Thanks,
Steve