prefect.deployments.steps.utility
Utility project steps that are useful for managing a project’s deployment lifecycle.
Steps within this module can be used within a build, push, or pull deployment action.
Example:
Use the run_shell_script setp to retrieve the short Git commit hash of the current
repository and use it as a Docker image tag:
Functions
run_shell_script
script: The script to rundirectory: The directory to run the script in. Defaults to the current working directory.env: A dictionary of environment variables to set for the scriptstream_output: Whether to stream the output of the script to stdout/stderrexpand_env_vars: Whether to expand environment variables in the script before running it
- A dictionary with the keys
stdoutandstderrcontaining the output of the script
pip_install_requirements
requirements_file: The requirements.txt to use for installation.directory: The directory the requirements.txt file is in. Defaults to the current working directory.stream_output: Whether to stream the output from pip install should be streamed to the console
- A dictionary with the keys
stdoutandstderrcontaining the output thepip installcommand
subprocess.CalledProcessError: if the pip install command fails for any reason
Classes
RunShellScriptResult
The result of a run_shell_script step.