Rio McMahon

06/14/2022, 5:42 PM
Hello - I’d like to automatically deploy a flow from within a CI/CD pipeline. I run into import errors and am curious if there is some registration pattern that doesn’t require the environment prefect is installed into to also have the flow dependencies installed for serialization? Ideally I’d like to run some CI/CD pipeline using the prefect docker image (but not necessarily install
or similar into it) then run
prefect register --project "Project Name" -l label -p
from within the pipeline. Realistically I could probably use the container that I am running the flow from within but am curious if there is an easier way. Thanks.

Kevin Kho

06/14/2022, 6:09 PM
There is a hacky way to move the imports inside the tasks or to try-except the imports. Moving the imports inside will defer execution and you won’t need them in the CI/CD

Rio McMahon

06/14/2022, 6:30 PM
Is it truly hacky if it works? 🤓 Thanks for the help!
😅 1