forked from concourse/concourse-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline.yaml
113 lines (113 loc) · 3.1 KB
/
pipeline.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
jobs:
- name: add-file-to-output
plan:
- task: create-one-output
config:
platform: linux
image_resource:
type: registry-image
source: { repository: busybox }
outputs:
- name: the-output
run:
path: /bin/sh
args:
- -cx
- |
ls -lah
date > ./the-output/file1
- task: add-file-to-previous-output
config:
platform: linux
image_resource:
type: registry-image
source: { repository: busybox }
# this task lists the same artifact as
# its input and output
inputs:
- name: the-output
outputs:
- name: the-output
run:
path: /bin/sh
args:
- -cx
- |
ls -lah
date > ./the-output/file2
- task: read-ouput-from-previous-step
output_mapping:
the-output: demo-disk
config:
platform: linux
image_resource:
type: registry-image
source: { repository: busybox }
inputs:
- name: the-output
outputs:
- name: the-output
run:
path: /bin/sh
args:
- -cx
- |
ls -lah ./the-output
cat ./the-output/file1 ./the-output/file2
- task: read-ouput-from-previous-step
config:
platform: linux
image_resource:
type: registry-image
source: { repository: busybox }
inputs:
- name: demo-disk
run:
path: /bin/sh
args:
- -cx
- |
ls -lah
cat ./demo-disk/file
- task: rename-and-read-output
# This task expects the artifact `generic-input`.
# input_mapping will map the tasks `generic-input` to
# the job plans `demo-disk` artifact
input_mapping:
generic-input: demo-disk
config:
platform: linux
image_resource:
type: registry-image
source: { repository: busybox }
inputs:
- name: generic-input
run:
path: /bin/sh
args:
- -cx
- |
ls -lah
cat ./generic-input/file
- task: try-and-read-the-output
input_mapping:
generic-input: demo-disk
config:
platform: linux
image_resource:
type: registry-image
source: { repository: busybox }
# `the-output` is not available in the job plan
# so this task will error while initializing
# since there's no artiact named `the-output` in
# the job's plan
inputs:
- name: the-output
run:
path: /bin/sh
args:
- -cx
- |
ls -lah
cat ./generic-input/file