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:
Runs one or more shell commands in a subprocess. Returns the standard
output and standard error of the script.Args:
script: The script to run
directory: The directory to run the script in. Defaults to the current
working directory.
env: A dictionary of environment variables to set for the script
stream_output: Whether to stream the output of the script to
stdout/stderr
expand_env_vars: Whether to expand environment variables in the script
before running it
shell: Whether to run the command through the system shell.
When True, shell operators like pipes (|), redirects (>),
and logical operators (&&, ||) are supported. Only set this
to True when you need shell features, as it has security
implications similar to subprocess.run(shell=True).
Returns:
A dictionary with the keys stdout and stderr containing the output
of the script
Examples:Retrieve the short Git commit hash of the current repository to use as
a Docker image tag: