FDE
01/10/2025, 7:11 PMMarvin
01/10/2025, 7:11 PM.yaml
file for Prefect 3.0 that sources a flow from a GitLab instance using a GitLab credentials block, and sets four parameters, follow the structure below. Note that you'll need to replace placeholders with your actual configuration values:
yaml
# prefect.yaml
version: 3.0
name: my-flow-deployment
description: Deployment for my flow sourced from GitLab
# Define parameters for the flow
parameters:
param1: default_value1
param2: default_value2
param3: default_value3
param4: default_value4
# Define the source of the flow
pull:
- git_clone:
repository: "<https://gitlab.com/your-repo.git>"
branch: "main"
credentials: "{{ prefect.blocks.gitlab-credentials.your-credentials-block }}"
# Define any other deployment specific settings
settings:
some_setting: some_value
### Key Sections:
- parameters: Define your flow parameters with default values.
- pull: Use git_clone
to source your flow from a GitLab repository. The credentials
field should reference a GitLab credentials block stored in Prefect.
- settings: Include any additional deployment settings as needed.
For more details, you can refer to the Prefect YAML documentation.FDE
01/10/2025, 7:13 PMMarvin
01/10/2025, 7:13 PMprefect.yaml
file, including scheduling and job variables:
### Common Settings
- name: The name of your deployment.
- description: A brief description of what the deployment does.
- version: The version of the deployment.
- parameters: Define parameters that your flow will accept.
- tags: Tags to categorize or filter your deployments.
### Schedule Settings
You can use RRule strings to define complex schedules:
yaml
schedule:
rrule: "DTSTART:20231101T090000Z\nRRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR"
timezone: "UTC"
This example schedules a flow to run every Monday, Wednesday, and Friday at 9 AM UTC.
### Job Variables
You can define job variables to customize the execution environment:
yaml
job_variables:
environment:
VAR1: "value1"
VAR2: "value2"
These variables can be overridden when running flows, and are visible in the Prefect UI under the Configuration tab.
For more detailed and tailored examples, you might want to check the Prefect YAML documentation and the scheduling documentation.FDE
01/10/2025, 7:14 PMMarvin
01/10/2025, 7:14 PMFDE
01/10/2025, 7:15 PMMarvin
01/10/2025, 7:16 PMFDE
01/14/2025, 3:23 PM