https://prefect.io logo
Title
a

ale

09/28/2020, 3:01 PM
Hi all, we’re trying to figure out how to build the image of a Prefect Flow inside a Jenkins pipeline. We would want to avoid using Prefect directly to build the image, mainly because we don’t want to have Jenkins to depend on Prefect for building docker containers. Have you find yourself in such situation before? How did you manage to create Prefect docker images without relying on storage.build() and flow.register()? Do you think it is something doable?
c

Chris White

09/28/2020, 3:21 PM
Hi Alessandro - I think this is possible but might be a little clunky; you could use
cloudpickle
directly to save the Flow contents to a file, and then place that file within your Docker image at
/opt/prefect/flows/slugify(flow-name).prefect
. The placement of the file could be done within Jenkins without requiring Prefect
a

ale

09/28/2020, 3:24 PM
Thank you very much @Chris White!!! Much appreciated 🙂
👍 1