Hello Prefect team, hello community,
I am looking into the new project feature that was introduced in 2.10 and how to revamp our current CI to this new setup. Currently, all our deployments are created via CI using separate stages for building the image, linking them to a infrastructure block, and creating the deployments. With prefect projects, these could be merged into one deploy CI stage that executes all of the previously independent stages as steps of the deployment process.
However, having them as separate stages comes with the huge benefit that we can reuse the image that is created in the first stage for all later stages, meaning that we have to install dependencies only once. With prefect projects, as far as i understand, we would need to install all dependencies as part of the docker image creation and separately on the machine that is running our CI steps, so that the deploy command can succeed. This would increase CI runtime substantially as we are dealing with complex dependencies.
Is there any way how we could execute the deploy step inside of the image that was created in the build step or is such a feature on the roadmap? Thank you for any input on this matter.