-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
artifact-disable-archive.yaml
63 lines (61 loc) · 1.99 KB
/
artifact-disable-archive.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
60
61
62
63
# This example demonstrates the ability to disable the default behavior of archiving (tar.gz)
# when saving output artifacts. For directories, when archive is set to none, files in directory
# will be copied recursively in the case of S3.
# Another option is to keep the archiving behavior, but skip or modify the compression
# behavior using the 'tar.compressionLevel' field.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: artifact-disable-archive-
spec:
entrypoint: artifact-disable-archive
templates:
- name: artifact-disable-archive
steps:
- - name: generate-artifact
template: hello-world-to-file
- - name: consume-artifact
template: print-message-from-files
arguments:
artifacts:
- name: etc
from: "{{steps.generate-artifact.outputs.artifacts.etc}}"
- name: hello-txt
from: "{{steps.generate-artifact.outputs.artifacts.hello-txt}}"
- name: hello-txt-nc
from: "{{steps.generate-artifact.outputs.artifacts.hello-txt-nc}}"
- name: hello-world-to-file
container:
image: busybox
command: [sh, -c]
args: ["echo hello world | tee /tmp/hello_world.txt | tee /tmp/hello_world_nc.txt ; sleep 1"]
outputs:
artifacts:
- name: etc
path: /etc
archive:
none: {}
- name: hello-txt
path: /tmp/hello_world.txt
archive:
none: {}
- name: hello-txt-nc
path: /tmp/hello_world_nc.txt
archive:
tar:
# no compression (also accepts the standard gzip 1 to 9 values)
compressionLevel: 0
- name: print-message-from-files
inputs:
artifacts:
- name: etc
path: /tmp/etc
- name: hello-txt
path: /tmp/hello.txt
- name: hello-txt-nc
path: /tmp/hello_nc.txt
container:
image: alpine:latest
command: [sh, -c]
args:
- cat /tmp/hello.txt && cat /tmp/hello_nc.txt && cd /tmp/etc && find .