Skip to content

Instantly share code, notes, and snippets.

@elsonrodriguez
Created September 13, 2019 22:54
Show Gist options
  • Save elsonrodriguez/04c38f3b1c68fb9de3ee9d59d81c9d1a to your computer and use it in GitHub Desktop.
Save elsonrodriguez/04c38f3b1c68fb9de3ee9d59d81c9d1a to your computer and use it in GitHub Desktop.
# The following workflow executes a diamond workflow
#
# A
# / \
# B C
# \ /
# D
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: dag-diamond-
spec:
entrypoint: diamond
arguments:
parameters:
- name: deps
value: B
templates:
- name: diamond
dag:
tasks:
- name: A
template: echo
arguments:
parameters: [{name: message, value: A}]
- name: B
dependencies: [A]
template: echo
arguments:
parameters: [{name: message, value: B}]
- name: C
dependencies: [A]
template: echo
arguments:
parameters: [{name: message, value: C}]
- name: D
dependencies: ["{{workflow.parameters.deps}}"]
template: echo
arguments:
parameters: [{name: message, value: D}]
- name: echo
inputs:
parameters:
- name: message
container:
image: alpine:3.7
command: [echo, "{{inputs.parameters.message}}"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment