-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathorigin-builder.yaml
228 lines (228 loc) · 5.28 KB
/
origin-builder.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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
apiVersion: v1
kind: Template
metadata:
name: origin-builder
parameters:
- name: SOURCE_URL
description: The URL of the fork of OpenShift to build
displayName: Source URL
required: true
value: https://github.com/openshift/origin.git
- name: SOURCE_REF
description: The Ref of the fork of OpenShift to build
displayName: Source REF
required: true
value: master
- name: PLATFORM
description: "The platform of the oc binary to build. Valid values: linux/amd64, darwin/amd64, windows/amd64"
displayName: "Platform"
value: darwin/amd64
- name: PR
description: The PR number to build. If populated, SOURCE_REF is ignored
displayName: PR Number
value: ""
required: false
objects:
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
app: build-origin
name: build-origin
spec:
output:
to:
kind: ImageStreamTag
name: build-origin:latest
runPolicy: Serial
source:
git:
uri: https://github.com/csrwng/build-origin.git
type: Git
strategy:
sourceStrategy:
env:
- name: SOURCE_URL
value: "${SOURCE_URL}"
- name: SOURCE_REF
value: "${SOURCE_REF}"
- name: PLATFORM
value: "${PLATFORM}"
- name: PR
value: "${PR}"
from:
kind: ImageStreamTag
name: origin-release-builder:latest
type: Source
triggers:
- imageChange: {}
type: ImageChange
status:
lastVersion: 0
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
app: origin-release-builder
name: origin-release-builder
spec:
output:
to:
kind: ImageStreamTag
name: origin-release-builder:latest
runPolicy: Serial
source:
dockerfile: |-
FROM origin-release
EXPOSE 8000
LABEL io.openshift.s2i.scripts-url "https://raw.githubusercontent.com/csrwng/build-origin/master/.s2i/bin"
RUN chown -R 1001 /go /tmp
USER 1001
ENV GIT_COMMITTER_NAME="Developer" GIT_COMMITTER_EMAIL="[email protected]"
CMD ["/bin/bash", "-c", "while(true); do date; sleep 30; done"]
type: Docker
strategy:
dockerStrategy:
from:
kind: ImageStreamTag
name: origin-release:golang-1.8
type: Docker
triggers:
- type: ConfigChange
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: build-origin
name: build-origin
spec:
replicas: 1
selector:
app: build-origin
deploymentconfig: build-origin
strategy:
activeDeadlineSeconds: 21600
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
annotations:
labels:
app: build-origin
deploymentconfig: build-origin
spec:
containers:
- image: " "
imagePullPolicy: Always
name: build-origin
ports:
- containerPort: 8000
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
livenessProbe:
httpGet:
path: /
port: 8000
scheme: HTTP
initialDelaySeconds: 1
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
readinessProbe:
httpGet:
path: /
port: 8000
scheme: HTTP
initialDelaySeconds: 1
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- build-origin
from:
kind: ImageStreamTag
name: build-origin:latest
type: ImageChange
status:
availableReplicas: 0
latestVersion: 0
observedGeneration: 0
replicas: 0
unavailableReplicas: 0
updatedReplicas: 0
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: build-origin
name: build-origin
spec: {}
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: origin-release
name: origin-release
spec:
tags:
- from:
kind: DockerImage
name: openshift/origin-release:golang-1.8
importPolicy: {}
name: golang-1.8
referencePolicy:
type: Source
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: origin-release-builder
name: origin-release-builder
spec: {}
- apiVersion: v1
kind: Route
metadata:
name: build-origin
spec:
port:
targetPort: 8000-tcp
to:
kind: Service
name: build-origin
weight: 100
wildcardPolicy: None
- apiVersion: v1
kind: Service
metadata:
labels:
app: build-origin
name: build-origin
spec:
ports:
- name: 8000-tcp
port: 8000
protocol: TCP
targetPort: 8000
selector:
app: build-origin
deploymentconfig: build-origin
sessionAffinity: None
type: ClusterIP