#storing coverage files back to the host

1 messages · Page 1 of 1 (latest)

worthy juniper
#

Inside the python env it is running some pip install and then coverage tool.

The standard thing to do is to bring the coverage directory back to the host.

so the localhost user can open the coverage file, or the users can store it as an artifact somewhere.

Whats the best way to persist files back to the host?

robust cargo
#

i think you need a function which takes the file and exports it, that seems to be the standard way -> dagger call -> args in -> pipeline execution -> object returned is a file/directory -> export to a path on host.

Something like this? But actually, since its unlikely the dir itself will change where the report is,

dagger call some-pipeline-stuff (returns container) directory --path "/app/out/coverage" export --path ./coverage

.. could be condensed to this?

dagger call some-pipeline-stuff (returns dir) export --path ./coverage

latent ginkgo
oak oriole
#

Just-in-time artifacts such as containers, directories and files expose an Export() function, enabling them to be exported to the host filesystem from the Dagger Function that produced them. The destination path on the host is passed to the function using the --path argument.