forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata-transformations.yaml
61 lines (55 loc) · 1.53 KB
/
data-transformations.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
50
51
52
53
54
55
56
57
58
59
# See doc docs/data-sourcing-and-transformation.md
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: data-transformations-
annotations:
workflows.argoproj.io/description: |
This workflow demonstrates using a data template to list in an S3 bucket
and then process those log files.
workflows.argoproj.io/version: ">= 3.1.0"
spec:
entrypoint: data-transformations
templates:
- name: data-transformations
steps:
- - name: list-log-files
template: list-log-files
- - name: process-logs
template: process-logs
withParam: "{{steps.list-log-files.outputs.result}}"
arguments:
artifacts:
- name: file
s3:
key: "{{item}}"
parameters:
- name: file-name
value: "{{item}}"
- name: list-log-files
data:
source:
artifactPaths:
name: test-bucket
s3:
bucket: my-bucket
transformation:
- expression: "filter(data, {# endsWith \"main.log\"})"
outputs:
artifacts:
- name: file
path: /file
- name: process-logs
inputs:
parameters:
- name: file-name
artifacts:
- name: file
path: /file
container:
image: argoproj/argosay:v2
command: [ sh, -c ]
args:
- |
echo {{inputs.parameters.file-name}}
head /file