Replies: 1 comment
-
In Argo Workflows, conditional execution is managed using the Understanding Conditional Execution: The - name: example-step
template: example-template
when: "{{steps.previous-step.outputs.result}} == 'success'" # Only executes when the previous step is successful In the above example, Controlling Subsequent Steps: To influence the execution of subsequent steps based on a condition, workflows must include conditional checks at each step. For more information, see the examples and resources below. apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: conditional-workflow-
spec:
entrypoint: main
templates:
- name: main
steps:
- - name: step-1
template: step-template
- - name: step-2
template: step-template
when: "{{steps.step-1.outputs.result}} == 'success'" # Executes if step-1 is successful
- - name: step-3
template: step-template
when: "{{steps.step-2.outputs.result}} == 'success'" # Executes if step-2 is successful Resources:
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
All reactions