Skip to content

Instantly share code, notes, and snippets.

@duboisf
Created January 25, 2019 13:56
Show Gist options
  • Save duboisf/8c3682adbd34593c6b3b7154c5dcc73d to your computer and use it in GitHub Desktop.
Save duboisf/8c3682adbd34593c6b3b7154c5dcc73d to your computer and use it in GitHub Desktop.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: test-
namespace: argo
spec:
entrypoint: reproduce
arguments:
parameters:
- name: items
value: |
[ "1", "2", "3", "4" ]
# Steps
templates:
- name: reproduce
steps:
- - name: step1
template: sub-steps
arguments:
parameters:
- name: cluster
value: "{{item}}"
withParam: "{{workflow.parameters.items}}"
- - name: step2
template: sub-steps
arguments:
parameters:
- name: cluster
value: "{{item}}"
withParam: "{{workflow.parameters.items}}"
- name: sub-steps
steps:
- - name: foo
template: exec
- - name: bar
template: exec
- - name: baz
template: exec
# Containers
- name: exec
container:
image: alpine
command: [sh, -c]
args:
- |
echo foo (bar)
@duboisf
Copy link
Author

duboisf commented Jan 25, 2019

$ argo get test-x8gk2
Name:                test-x8gk2
Namespace:           argo
ServiceAccount:      basic-workflow
Status:              Running
Created:             Fri Jan 25 08:53:34 -0500 (5 minutes ago)
Started:             Fri Jan 25 08:53:34 -0500 (5 minutes ago)
Duration:            5 minutes 0 seconds
Parameters:          
  items:             [ "1", "2", "3", "4" ]


STEP               PODNAME                DURATION  MESSAGE
 ● test-x8gk2                                       
 └-·-✖ step1(0:1)                                   child 'test-x8gk2-2931933513' failed
   | └---✖ foo     test-x8gk2-2931933513  3s        failed with exit code 2
   ├-✖ step1(1:2)                                   child 'test-x8gk2-3072094959' failed
   | └---✖ foo     test-x8gk2-3072094959  3s        failed with exit code 2
   ├-● step1(2:3)                                   
   | └---✖ foo     test-x8gk2-1920784633  3s        failed with exit code 2
   └-✖ step1(3:4)                                   child 'test-x8gk2-1530984219' failed
     └---✖ foo     test-x8gk2-1530984219  1s        failed with exit code 2

@duboisf
Copy link
Author

duboisf commented Jan 25, 2019

This is for argo 2.2.1, I deployed argo constrained to a namespace using https://github.com/argoproj/argo/tree/master/manifests/namespace-install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment