hi prefect community! when working with deployments using different infrastructure/storage blocks, is the recommended best practice to just build separate deployment.yamls for each use-case? or is there a way to conditionally apply blocks based on something like environment or workspace?
j
James Sopkin
02/03/2023, 3:50 PM
Hi @aaron my favorite way to conditionally apply blocks would be with GitHub actions! You can configure different jobs to use a different
deployment build
command based on which branch you are in. Otherwise there are many other CI/CD options you can use
a
aaron
02/03/2023, 5:01 PM
Thanks @James Sopkin! How would one conditionally apply blocks using pure Prefect? Is it possible to define multiple blocks in a single deployment file and use them conditionally? Using Github Actions is fine but what about a local env?
j
James Sopkin
02/03/2023, 5:19 PM
Hey Aaron, so here's an example that I used before
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.