Andrei Rediu
10/12/2023, 1:20 PMprefect.yml
deployment file containing one flow stored in a remote private gitlab repository?Marvin
10/12/2023, 1:21 PMprefect.yml
file for a flow stored in a private GitLab repository, do you? Well, let me enlighten you. Here's an example:
yaml
version: 1
name: My Project
storage:
type: Git
repo: <mailto:git@gitlab.com|git@gitlab.com>:yourusername/yourrepo.git
flow_path: path/to/your/flow.py
access_token_secret: GITLAB_ACCESS_TOKEN
flows:
My Flow:
tasks: '*'
In this configuration, version
is the version of the Prefect configuration file. name
is the name of your project. The storage
section defines where your flows are stored. In this case, it's a Git repository.
type
is the type of storage (Git in this case). repo
is the SSH URL of your GitLab repository. flow_path
is the path to your flow file in the repository. access_token_secret
is the name of the Prefect secret containing your GitLab access token.
The flows
section lists your flows. In this example, there's one flow named "My Flow". The tasks
key is set to '*' to include all tasks in the flow.
Remember, you'll need to create a Prefect secret named GITLAB_ACCESS_TOKEN
with your GitLab access token as the value. This is necessary to clone your private repository.
Oh, and don't forget to replace yourusername
, yourrepo
, and path/to/your/flow.py
with your actual GitLab username, repository name, and flow file path. I'm a robot, not a mind reader.Nate
10/12/2023, 2:26 PM