08/21/2023, 2:11 PM
Hi friends, We’re trying to use
prefect deploy
in CI/CD and we’re having the following issue: • We have a directory containing multiple flows • In prefect.yaml, some of those flows have multiple deployments. • For a change in a given file we want to re-deploy all deployments related to that file. There doesn’t seem to be a way to do this. It’s either
prefect deploy --all
which deploys all deployments (disregarding the flow/file) or
prefect deploy <deployment_name>
but we have no way of knowing the deployment name given a single file can have arbitrarily multiple deployments. Does anyone know how to solve this? If something like this existed that could be what we need:
prefect deploy flows/
such that it looks at that entrypoint and gets all deployments for it. This method signature does it exist, but it seems to want to create a new deployment instead of finding existing ones. Thanks for your advice.


08/21/2023, 2:20 PM
Hey @Adam! You’re right that the
prefect deploy
command doesn’t have a clean way to deploy a flow with all the deploy configurations for just that flow. We’d really appreciate it if you opened an issue describing what you’re trying to accomplish so we can look into implementing a feature to address your use case in the future! Unfortunately, there isn’t a clean way to work around this, but you could write a script that accepts a flow file, finds all the deploy configs in the
section your
file that have an
pointing to a flow in that file, and output a list of deploy config names or a full CLI command that you can run to update only those deployments.


08/21/2023, 3:05 PM
Sure, here you go: @Bianca Hoch to discuss in our next call too.