Hello! Is there a way to add git pull step only to...
# ask-community
k
Hello! Is there a way to add git pull step only to selected deployments in prefect.yaml?
b
Hey Kacper! Yup you should be able to do that by adding a custom pull step to the deployment declaration. Something like this:
Copy code
deployments:
  - name: deployment-with-git-pull
    entrypoint: path/to/flow.py:flow_function
    pull:
      - prefect.deployments.steps.git_clone:
          repository: <https://github.com/your-org/your-repo.git>
          credentials: "{{ prefect.blocks.github-credentials.my-credentials }}"
🙌 1
If you're reusing the pull step for a few select deployments and you'd rather not write it out over-and-over again, you could add a
definitions
section to your prefect.yaml file to store the pull step as an alias which can be referenced as needed (more on that here).
k
@Bianca Hoch do you know if this ability is available from any specific version? I am using 2.14.11 and it seems that it doesnt work properly here
b
Hey Kacper! All versions of 2.0 and 3.0 should support this 🤔
what are behavior are you seeing?