You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps in a workflow may need to execute from different locations.
Rather than put this common logic into the script portion of the command, we should support a working_directory setting.
Relative paths should be relative to the Atmos base directory. (aka base-dir). This keeps directory locations straightforward and determinisitc.
Expected Behavior
Setting the working_directory, causes atmos to change directory into this location before executing the commands. If the directory does not exist, atmos exits with a clear error message.
Use Case
Run some raw terraform commands (e.g. terraform import) inside of a component directory.
Run some commands in /tmp (e.g. to download files and unpack them)
With both options being able to be mixed and matched.
Alternatives Considered
We could run cd /some/path as part of the command step. If the workflow command doesn't properly handle exit codes in the script, then it could proceed to run other commands causing damage.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
osterman
changed the title
Add Support for Optional working_directory for Workflow Steps
Add optional working_directory to Workflow Steps
Feb 4, 2025
Describe the Feature
Steps in a workflow may need to execute from different locations.
Rather than put this common logic into the script portion of the command, we should support a
working_directory
setting.Relative paths should be relative to the Atmos base directory. (aka
base-dir
). This keeps directory locations straightforward and determinisitc.Expected Behavior
Setting the
working_directory
, causes atmos to change directory into this location before executing the commands. If the directory does not exist, atmos exits with a clear error message.Use Case
terraform import
) inside of a component directory./tmp
(e.g. to download files and unpack them)Describe Ideal Solution
Alternatively, support a
working_directory
for the entire workflow.With both options being able to be mixed and matched.
Alternatives Considered
We could run
cd /some/path
as part of the command step. If the workflow command doesn't properly handle exit codes in the script, then it could proceed to run other commands causing damage.Additional Context
No response
The text was updated successfully, but these errors were encountered: