@@ -79,9 +79,8 @@ name: Hello World with parameters
79
79
version : ' 1.0'
80
80
functions :
81
81
- name : whalesayimage
82
- resource : docker/whalesay
83
- type : container
84
82
metadata :
83
+ image : docker/whalesay
85
84
command : cowsay
86
85
states :
87
86
- name : whalesay
@@ -166,9 +165,8 @@ name: Multi Step Hello
166
165
version : ' 1.0'
167
166
functions :
168
167
- name : whalesayimage
169
- resource : docker/whalesay
170
- type : container
171
168
metadata :
169
+ image : docker/whalesay
172
170
command : cowsay
173
171
states :
174
172
- name : hello1
@@ -271,9 +269,8 @@ name: DAG Diamond Example
271
269
version : ' 1.0'
272
270
functions :
273
271
- name : echo
274
- resource : alpine:3.7
275
- type : container
276
272
metadata :
273
+ image : alpine:3.7
277
274
command : ' [echo, "{{inputs.parameters.message}}"]'
278
275
states :
279
276
- name : A
@@ -396,34 +393,30 @@ name: Scripts and Results Example
396
393
version : ' 1.0'
397
394
functions :
398
395
- name : gen-random-int-bash
399
- resource : debian:9.4
400
- type : script
401
396
metadata :
397
+ image : debian:9.4
402
398
command : bash
403
399
source : |-
404
400
cat /dev/urandom | od -N2 -An -i | awk -v f=1 -v r=100 '{printf "%i
405
401
", f + r * $1 / 65536}'
406
402
- name : gen-random-int-python
407
- resource : python:alpine3.6
408
- type : script
409
403
metadata :
404
+ image : python:alpine3.6
410
405
command : python
411
406
source : |
412
407
import random
413
408
i = random.randint(1, 100)
414
409
print(i)
415
410
- name : gen-random-int-javascript
416
- resource : node:9.1-alpine
417
- type : script
418
411
metadata :
412
+ image : node:9.1-alpine
419
413
command : node
420
414
source : |
421
415
var rand = Math.floor(Math.random() * 100);
422
416
console.log(rand);
423
417
- name : printmessagefunc
424
- resource : alpine:latest
425
- type : container
426
418
metadata :
419
+ image : alpine:latest
427
420
command : sh, -c
428
421
source : ' echo result was: {{inputs.parameters.message}}'
429
422
states :
@@ -504,9 +497,8 @@ name: Loop over data example
504
497
version : ' 1.0'
505
498
functions :
506
499
- name : whalesay
507
- resource : docker/whalesay:latest
508
- type : container
509
500
metadata :
501
+ image : docker/whalesay:latest
510
502
command : cowsay
511
503
states :
512
504
- name : injectdata
@@ -602,16 +594,14 @@ name: Conditionals Example
602
594
version : ' 1.0'
603
595
functions :
604
596
- name : flip-coin-function
605
- resource : python:alpine3.6
606
- type : script
607
597
metadata :
598
+ image : python:alpine3.6
608
599
command : python
609
600
source : import random result = "heads" if random.randint(0,1) == 0 else "tails"
610
601
print(result)
611
602
- name : echo
612
- resource : alpine:3.6
613
- type : container
614
603
metadata :
604
+ image : alpine:3.6
615
605
command : sh, -c
616
606
states :
617
607
- name : flip-coin
@@ -703,9 +693,8 @@ name: Retry Example
703
693
version : ' 1.0'
704
694
functions :
705
695
- name : fail-function
706
- resource : python:alpine3.6
707
- type : container
708
696
metadata :
697
+ image : python:alpine3.6
709
698
command : python
710
699
states :
711
700
- name : retry-backoff
@@ -790,14 +779,12 @@ name: Recursion Example
790
779
version : ' 1.0'
791
780
functions :
792
781
- name : heads-function
793
- resource : alpine:3.6
794
- type : container
795
782
metadata :
783
+ image : alpine:3.6
796
784
command : echo "it was heads"
797
785
- name : flip-coin-function
798
- resource : python:alpine3.6
799
- type : script
800
786
metadata :
787
+ image : python:alpine3.6
801
788
command : python
802
789
source : import random result = "heads" if random.randint(0,1) == 0 else "tail" print(result)
803
790
states :
@@ -911,19 +898,16 @@ name: Exit/Error Handling Example
911
898
version : ' 1.0'
912
899
functions :
913
900
- name : intentional-fail-function
914
- resource : alpine:latest
915
- type : container
916
901
metadata :
902
+ image : alpine:latest
917
903
command : " [sh, -c]"
918
904
- name : send-email-function
919
- resource : alpine:latest
920
- type : script
921
905
metadata :
906
+ image : alpine:latest
922
907
command : " [sh, -c]"
923
908
- name : celebrate-cry-function
924
- resource : alpine:latest
925
- type : script
926
909
metadata :
910
+ image : alpine:latest
927
911
command : " [sh, -c]"
928
912
states :
929
913
- name : intentional-fail-state
0 commit comments