Skip to content

Commit

Permalink
move workflow error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Cerebrovinny committed Nov 10, 2024
1 parent c2e327b commit 4990c98
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
20 changes: 19 additions & 1 deletion cmd/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,25 @@ import (
var workflowCmd = &cobra.Command{
Use: "workflow",
Short: "Execute a workflow",
Long: `This command executes a workflow: atmos workflow <name> -f <file>`,
Long: `This command executes a workflow: atmos workflow <name> -f <file>
Atmos workflow commands support failure handling and resume functionality:
When a workflow step fails:
- The failed step name and command will be displayed
- A resume command will be provided to restart from the failed step
Example:
Step 'deploy-vpc' failed!
Error: Error applying plan:
1 error occurred: AWS API call failed
Command failed: terraform apply vpc -auto-approve
To resume the workflow from this step, run:
atmos workflow deploy-infra -f workflow1 --from-step deploy-vpc
For more details refer to https://atmos.tools/cli/commands/workflow/`,
Example: "atmos workflow\n" +
"atmos workflow <name> -f <file>\n" +
"atmos workflow <name> -f <file> -s <stack>\n" +
Expand Down
13 changes: 0 additions & 13 deletions internal/exec/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,6 @@ func processHelp(
"If the workspace does not exist, the command creates it by executing the 'terraform workspace new' command.\n\n" +
"Usage: atmos terraform workspace <component> -s <stack>\n\n" +
"For more details refer to https://atmos.tools/cli/commands/terraform/workspace\n")
} else if componentType == "workflow" && command == "" {
u.PrintMessage("\nAtmos workflow commands support failure handling and resume functionality:\n\n" +
"When a workflow step fails:\n" +
" - The failed step name and command will be displayed\n" +
" - A resume command will be provided to restart from the failed step\n\n" +
"Example:\n" +
"Step 'deploy-vpc' failed!\n" +
"Error: Error applying plan:\n" +
"1 error occurred: AWS API call failed\n\n" +
"Command failed: terraform apply vpc -auto-approve\n\n" +
"To resume the workflow from this step, run:\n" +
"atmos workflow deploy-infra -f workflow1 --from-step deploy-vpc\n\n" +
"For more details refer to https://atmos.tools/cli/commands/workflow/\n")
} else {
u.PrintMessage(fmt.Sprintf("\nAtmos supports native '%s' commands with all the options, arguments and flags.\n", componentType))
u.PrintMessage("In addition, 'component' and 'stack' are required in order to generate variables for the component in the stack.\n")
Expand Down

0 comments on commit 4990c98

Please sign in to comment.