-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add feature to continue workflow on failed/error steps/tasks (#1205)
- Loading branch information
Showing
8 changed files
with
244 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: dag-contiueOn-fail- | ||
spec: | ||
entrypoint: workflow | ||
templates: | ||
- name: workflow | ||
dag: | ||
tasks: | ||
- name: A | ||
template: whalesay | ||
- name: B | ||
dependencies: [A] | ||
template: intentional-fail | ||
continueOn: | ||
failed: true | ||
- name: C | ||
dependencies: [A] | ||
template: whalesay | ||
- name: D | ||
dependencies: [B, C] | ||
template: whalesay | ||
- name: E | ||
dependencies: [A] | ||
template: intentional-fail | ||
- name: F | ||
dependencies: [A] | ||
template: whalesay | ||
- name: G | ||
dependencies: [E, F] | ||
template: whalesay | ||
|
||
- name: whalesay | ||
container: | ||
image: docker/whalesay:latest | ||
command: [cowsay] | ||
args: ["hello world"] | ||
|
||
- name: intentional-fail | ||
container: | ||
image: alpine:latest | ||
command: [sh, -c] | ||
args: ["echo intentional failure; exit 1"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Example on specifying parallelism on the outer workflow and limiting the number of its | ||
# children workflowss to be run at the same time. | ||
# | ||
# As the parallelism of A is 1, the four steps of seq-step will run sequentially. | ||
|
||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: workflow-continueOn-fail- | ||
spec: | ||
entrypoint: workflow | ||
templates: | ||
- name: workflow | ||
steps: | ||
- - name: wf-ignore | ||
template: workflow-ignore | ||
- name: wf-not-ignore | ||
template: workflow-not-ignore | ||
|
||
- name: workflow-ignore | ||
steps: | ||
- - name: A | ||
template: whalesay | ||
- - name: B | ||
template: whalesay | ||
- name: C | ||
template: intentional-fail | ||
continueOn: | ||
failed: true | ||
- - name: D | ||
template: whalesay | ||
|
||
- name: workflow-not-ignore | ||
steps: | ||
- - name: E | ||
template: whalesay | ||
- - name: F | ||
template: whalesay | ||
- name: G | ||
template: intentional-fail | ||
- - name: H | ||
template: whalesay | ||
|
||
# - name: B | ||
# inputs: | ||
# parameters: | ||
# - name: seq-id | ||
# steps: | ||
# - - name: jobs | ||
# template: one-job | ||
# arguments: | ||
# parameters: | ||
# - name: seq-id | ||
# value: "{{inputs.parameters.seq-id}}" | ||
# withParam: "[1, 2]" | ||
|
||
- name: whalesay | ||
container: | ||
image: docker/whalesay:latest | ||
command: [cowsay] | ||
args: ["hello world"] | ||
|
||
- name: intentional-fail | ||
container: | ||
image: alpine:latest | ||
command: [sh, -c] | ||
args: ["echo intentional failure; exit 1"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters