Hi, I am running deployments on Octopus Cloud and one step is being run on Hosted Ubuntu machine inside my custom docker image.
At the end of the deployment step I’ve added
new_octopusartifact "test-results.html". However, the artifact is not being collected at the end of the step with error:
09:52:05 Verbose | Artifact test-results.html will be collected from /cypress/test-results.html after this step completes
09:52:05 Verbose | Process /bin/bash in /home/Octopus/Work/20210505095134-1028-96 exited with code 0
09:52:05 Verbose | Collecting artifact test-results.html
09:52:05 Warning | Artifact test-results.html not found at path ‘/cypress/test-results.html’. This can happen if the file is deleted before the task completes.
I believe this is somehow related to the step running inside the docker image, and the Docker image is being deleted before the artifact is collected. I am not doing any cleanup whatsoever.
Thanks for reaching out!
It looks like you’ve run into the same issue discussed here. It appears this is working as intended and the only workaround is to script the copying of the file elsewhere before it is deleted.
Would that work for you? Please let me know how you get on.
Hi, thank you so much for such a quick reply. Yep, that is exactly the same issue I have right now.
I was wondering if there is a possibility to mount the folder outside of the docker image on the host machine and upload the artifact from there later.
Uploading artifact to 3rd party storage just to download it in next step and attach it to build is really ugly imho and will be hard to maintain
I agree there should be a better way of handling this. I’ll raise this internally for discussion to see if there’s a better way we could manage this.
I’ll let you know if we can come up with an alternative solution.
Thank you! Sounds good to me.
An alternative solution that we’ve come up with is to spin up your own worker where you would be able to pull the file outside of the container and then retrieve it as an artifact in the usual way.
Would this work for you?
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.