gsoft-inc/azure-pipelines-lighthouse

is it possible to download Lighthouse report (json/html) in pipeline

Closed this issue · 1 comments

There is an option to download Lighthouse report when previewing it. But I have a requirement to collect all reports in AWS S3 bucket, my question can I access that json/html file with some action in pipeline? Where is it placed? There is an input 'Working Directory', what is it for?

@DmitriyTolkachov , if you'd like to provide your own version of the npm Lighthouse package, instead of letting the extension download the latest version for you, you can use the Working Directory input to provide the directory where your node_modules is located.

image

About the ability to download the generated JSON and HTML report files. For now, there is no way for a user to specify the exact location where these files could be saved, but you can still find them.

The extension creates a directory named __lighthouse in the Azure DevOps agent temporary directory. This temporary directory location is defined by the environment variable Agent.TempDirectory.

The generated file names are based on the target URL. For https://jigsaw.w3.org/HTTP/Basic/, on my Ubuntu Azure DevOps agent, the generated full path seen in the logs are:

/home/vsts/work/_temp/__lighthouse/jigsaw.w3.org-88879.report.html
/home/vsts/work/_temp/__lighthouse/jigsaw.w3.org-88879.report.json

If it's not enough for you to locate them, please reopen the issue and we'll find something else.

Also, these files are bundled in the pipeline logs. I'm not sure if these can be downloaded programmatically, but you can find them here:

image

image