-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathworkflow.yaml
49 lines (49 loc) · 1.12 KB
/
workflow.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
main:
params: [args]
steps:
- init:
assign:
- bucket: ${args.bucket}
- file: ${args.file}
- urls: ${args.urls}
- gcsUri: ${"gs://" + bucket + "/" + file}
- logFile:
call: sys.log
args:
text: ${gcsUri}
- label:
call: http.post
args:
url: ${urls.LABELER_URL}
auth:
type: OIDC
body:
bucket: ${bucket}
file: ${file}
result: labelResponse
- resize:
call: http.post
args:
url: ${urls.RESIZER_URL}
auth:
type: OIDC
body:
bucket: ${bucket}
file: ${file}
result: resizeResponse
- watermark:
call: http.post
args:
url: ${urls.WATERMARKER_URL}
auth:
type: OIDC
body:
bucket: ${resizeResponse.body.bucket}
file: ${resizeResponse.body.file}
labels: ${labelResponse.body.labels}
result: watermarkResponse
- final:
return:
label: ${labelResponse.code}
resize: ${resizeResponse.code}
watermark: ${watermarkResponse.code}