forked from tektoncd/catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildpacks.yaml
More file actions
140 lines (137 loc) · 4.33 KB
/
Copy pathbuildpacks.yaml
File metadata and controls
140 lines (137 loc) · 4.33 KB
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: buildpacks
labels:
app.kubernetes.io/version: "0.1"
annotations:
tekton.dev/pipelines.minVersion: "0.17.0"
tekton.dev/tags: image-build
tekton.dev/displayName: "Buildpacks"
tekton.dev/platforms: "linux/amd64"
tekton.dev/deprecated: "true"
spec:
description: >-
The Buildpacks pipeline builds source from a Git repository into a container image and pushes it to a registry, using Cloud Native Buildpacks.
workspaces:
- name: source-ws
description: Location where source is stored.
- name: cache-ws
description: Location where cache is stored if CACHE_IMAGE is not provided.
optional: true
params:
- name: BUILDER_IMAGE
description: The image on which builds will run (must include lifecycle and compatible buildpacks).
- name: TRUST_BUILDER
description: >-
Whether the builder image is trusted.
When false, each build phase is executed in isolation and credentials are only shared with trusted images.
default: "false"
- name: APP_IMAGE
description: The name of where to store the app image.
- name: SOURCE_URL
description: A git repo url where the source code resides.
- name: SOURCE_REFERENCE
description: The branch, tag or SHA to checkout.
default: ""
- name: SOURCE_SUBPATH
description: A subpath within checked out source where the source to build is located.
default: ""
- name: ENV_VARS
type: array
description: Environment variables to set during _build-time_.
default: []
- name: PROCESS_TYPE
description: The default process type to set on the image.
default: "web"
- name: RUN_IMAGE
description: The name of the run image to use (defaults to image specified in builder).
default: ""
- name: CACHE_IMAGE
description: The name of the persistent cache image.
default: ""
- name: USER_ID
description: The user ID of the builder image user.
default: "1000"
- name: GROUP_ID
description: The group ID of the builder image user.
default: "1000"
tasks:
- name: fetch-from-git
taskRef:
name: git-clone
params:
- name: url
value: $(params.SOURCE_URL)
- name: revision
value: $(params.SOURCE_REFERENCE)
workspaces:
- name: output
workspace: source-ws
- name: build-trusted
runAfter:
- fetch-from-git
taskRef:
name: buildpacks
when:
- input: "$(params.TRUST_BUILDER)"
operator: in
values: ["true", "yes", "TRUE", "True"]
workspaces:
- name: source
workspace: source-ws
- name: cache
workspace: cache-ws
params:
- name: BUILDER_IMAGE
value: "$(params.BUILDER_IMAGE)"
- name: APP_IMAGE
value: "$(params.APP_IMAGE)"
- name: SOURCE_SUBPATH
value: "$(params.SOURCE_SUBPATH)"
- name: PROCESS_TYPE
value: "$(params.PROCESS_TYPE)"
- name: ENV_VARS
value: ["$(params.ENV_VARS)"]
- name: RUN_IMAGE
value: "$(params.RUN_IMAGE)"
- name: CACHE_IMAGE
value: "$(params.CACHE_IMAGE)"
- name: USER_ID
value: "$(params.USER_ID)"
- name: GROUP_ID
value: "$(params.GROUP_ID)"
- name: build-untrusted
runAfter:
- fetch-from-git
taskRef:
name: buildpacks-phases
when:
- input: "$(params.TRUST_BUILDER)"
operator: notin
values: ["true", "yes", "TRUE", "True"]
workspaces:
- name: source
workspace: source-ws
- name: cache
workspace: cache-ws
params:
- name: BUILDER_IMAGE
value: "$(params.BUILDER_IMAGE)"
- name: APP_IMAGE
value: "$(params.APP_IMAGE)"
- name: SOURCE_SUBPATH
value: "$(params.SOURCE_SUBPATH)"
- name: ENV_VARS
value: ["$(params.ENV_VARS)"]
- name: PROCESS_TYPE
value: "$(params.PROCESS_TYPE)"
- name: RUN_IMAGE
value: "$(params.RUN_IMAGE)"
- name: CACHE_IMAGE
value: "$(params.CACHE_IMAGE)"
- name: USER_ID
value: "$(params.USER_ID)"
- name: GROUP_ID
value: "$(params.GROUP_ID)"