what
- Update
atmos workflow
command to allow restarting workflows from a named step - Update workflow docs https://atmos.tools/core-concepts/workflows/
why
Useful when you want to restart a workflow from a particular step.
Each workflow step can be given an arbitrary name (step's identifier) using the name
attribute. For example:
workflows:
test-1:
description: "Test workflow"
steps:
- command: echo Command 1
name: step1
type: shell
- command: echo Command 2
name: step2
type: shell
- command: echo Command 3
name: step3
type: shell
- command: echo Command 4
type: shell
The step's name can be used in the --from-step
command-line flag to start the workflow execution from the step.
For example, the following command will skip the first two steps and will start executing the workflow from step3
:
atmos workflow test-1 -f workflow1 --from-step step3
This is useful when you want to restart the workflow from a particular step.
For example:
- You run the workflow first time with the command
atmos workflow test-1 -f workflow1
step1
andstep2
succeed, butstep3
fails- You fix the issue with the
step3
command - You don't want to execute
step1
andstep2
again (to not spend time on it, or if they are
not idempotent) - You run the command
atmos workflow test-1 -f workflow1 --from-step step3
to restart the workflow fromstep3
related
- Closes #271
test
atmos workflow test-1 -f workflow1 --from-step step3
Executing the workflow 'test-1' from 'examples/complete/stacks/workflows/workflow1.yaml'
description: Test workflow
steps:
- name: step1
command: echo Command 1
type: shell
- name: step2
command: echo Command 2
type: shell
- name: step3
command: echo Command 3
type: shell
- command: echo Command 4
type: shell
- command: echo Command 5
type: shell
Executing workflow step: echo Command 3
Executing command:
echo Command 3
Command 3
Executing workflow step: echo Command 4
Executing command:
echo Command 4
Command 4
Executing workflow step: echo Command 5
Executing command:
echo Command 5
Command 5