-
Notifications
You must be signed in to change notification settings - Fork 1
/
pipeline-pass-resources.yaml
76 lines (75 loc) · 1.85 KB
/
pipeline-pass-resources.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
resources:
- name: resource-repo
type: git
check_every: 1m
source:
uri: git@github.com:kirthiprakash/pipeline-example.git
branch: master
private_key: ((prikey))
paths:
- app
- name: resource-gist
type: git
source:
branch: master
uri: ((publishing-outputs-gist-uri))
private_key: ((prikey))
jobs:
- name: stage-display-file
plan:
- get: resource-repo
version: every
trigger: true
- get: resource-gist
- task: display-file
config:
platform: linux
image_resource:
type: docker-image
source: {repository: busybox}
inputs:
- name: resource-repo
run:
path: /bin/sh
args:
- -exc
- |
cat resource-repo/app/file.txt
outputs:
- name: files
- task: mark-stage-as-success
config:
platform: linux
image_resource:
type: docker-image
source: {repository: alpine/git}
inputs:
- name: resource-repo
- name: resource-gist
outputs:
- name: updated-gist
run:
path: resource-repo/push-to-gist.sh
- put: resource-gist
params: {repository: updated-gist}
- name: prod-display-file
plan:
- get: resource-repo
- get: resource-gist
trigger: true
version: every
passed: [stage-display-file]
- task: display-file
config:
platform: linux
image_resource:
type: docker-image
source: {repository: busybox}
inputs:
- name: resource-repo
run:
path: /bin/sh
args:
- -exc
- |
cat resource-repo/app/file.txt