We just released Prefect 2.10.13, which brings som...
# announcements
j
We just released Prefect 2.10.13, which brings some big improvements to project-based deployments 🚀. You can now run prefect deploy without first initializing a project. If you run prefect deploy without a project initialized, the CLI will generate a default pull step that your worker can use to retrieve your flow code when executing scheduled flow runs. The prefect deploy command will also prompt you with scheduling options, making it even easier to schedule your flows 🕐 . This release also adds two new deployment steps:
pip_install_requirements
and
run_shell_script
. Both are new 'utility' deployment steps that can be used to automate portions of your deployment process 🧰 . For example, use the
pip_install_requirements
step to install Python dependencies before kicking off a flow run:
Copy code
pull:
    * prefect.projects.steps.git_clone_project:
        id: clone-step
        repository: <https://github.com/org/repo.git>
    * prefect.projects.steps.pip_install_requirements:
        directory: {{ clone-step.directory }}
        requirements_file: requirements.txt
        stream_output: False
Use the
run_shell_script
step to grab your repository's commit hash and use it to tag your Docker image:
Copy code
build:
    * prefect.projects.steps.run_shell_script:
        id: get-commit-hash
        script: git rev-parse --short HEAD
        stream_output: false
    * prefect.projects.steps.build_docker_image:
        requires: prefect-docker
        image_name: my-image
        image_tag: "{{ get-commit-hash.stdout }}"
        dockerfile: auto
See the release notes for more information.
🎉 6
party gritty 9
🚀 14
👍 4
blob attention gif 2
P 9
🧈 8