-
Notifications
You must be signed in to change notification settings - Fork 270
/
template.yml
167 lines (167 loc) · 3.71 KB
/
template.yml
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
apiVersion: template.openshift.io/v1
kind: Template
labels:
template: gows-builder
metadata:
name: gows
objects:
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
labels:
build: gows
name: gows
spec:
lookupPolicy:
local: false
status:
dockerImageRepository: ""
- apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
labels:
build: gows
name: gows-build
spec:
output:
to:
kind: ImageStreamTag
name: gows:build
source:
dockerfile: |
FROM golang:1.9.2
WORKDIR /go/src/github.com/redhatcop/gows
COPY main.go .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gows .
git:
uri: https://github.com/redhat-cop/gows
type: Git
strategy:
dockerStrategy:
from:
kind: ImageStreamTag
name: golang:1.9.2
type: Docker
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
from:
kind: ImageStreamTag
name: golang:1.9.2
type: ImageChange
- apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
labels:
build: gows
name: gows-busybox
spec:
output:
to:
kind: ImageStreamTag
name: gows:busybox
source:
images:
- from:
kind: ImageStreamTag
name: gows:build
paths:
- destinationDir: .
sourcePath: /go/src/github.com/redhatcop/gows/gows
dockerfile: |
FROM busybox
WORKDIR /opt
COPY gows /bin/gows
EXPOSE 8080
CMD ["/bin/gows"]
git:
uri: https://github.com/redhat-cop/gows
type: Git
strategy:
dockerStrategy:
from:
kind: ImageStreamTag
name: busybox:latest
type: Docker
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
from:
kind: ImageStreamTag
name: gows:build
type: ImageChange
- apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
labels:
build: gows
name: gows-s2i
spec:
output:
to:
kind: ImageStreamTag
name: gows:s2i
source:
contextDir: build-s2i-gows
git:
uri: https://github.com/redhat-cop/containers-quickstarts
type: Git
strategy:
dockerStrategy:
from:
kind: ImageStreamTag
name: gows:busybox
type: Docker
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
from:
kind: ImageStreamTag
name: gows:busybox
type: ImageChange
- apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
labels:
build: gows
name: gows
spec:
output:
to:
kind: ImageStreamTag
name: gows:latest
source:
contextDir: "${SITE_CONTEXT_DIR}"
git:
ref: "${SITE_SOURCE_REPOSITORY_REF}"
uri: "${SITE_SOURCE_REPOSITORY_URL}"
type: Git
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: gows:s2i
type: Source
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
from:
kind: ImageStreamTag
name: gows:s2i
type: ImageChange
parameters:
- description: Path within Git repository to build; empty for root of repository
name: SITE_CONTEXT_DIR
required: false
value: build-s2i-gows/demo
- description: Git branch/tag reference
name: SITE_SOURCE_REPOSITORY_REF
value: master
- description: Git source URL for application
name: SITE_SOURCE_REPOSITORY_URL
required: true
value: https://github.com/redhat-cop/containers-quickstarts