Hi,
We are evaluating dagger, and we were wondering if there was any way to retrieve test reports files after a failure (non-zero exit code). For example (see code below), after running e2e browser tests, we would like to retrieve the junit (or xunit) report if the test failed.
Like docker build / buildx, if there is failure (non-zero exit code), the execution stops and no artifacts can be retrieved or exported. In a "classic" docker setup, we would build the image, then run the image with a mounted volume where the container can write the report to the host filesystem.
- We tried mounting a volume with
WithMountedDirectory("/output", src)but it seems to do much (no data in or out). Note that is on docker desktop on a Mac. - I could imagine we could workaround would be for the test to always exit with 0, export the report file and then fail based on the content of the report.
- Would running the test as a service after the image has been built be a suitable workaround? Or would that break the caching?
Has anybody found a suitable workaround, or I just can't read the docs?
Thanks,
JM