forked from user-cont/release-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenshift-template-dev.yml
142 lines (141 loc) · 3.47 KB
/
openshift-template-dev.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
kind: Template
apiVersion: v1
metadata:
name: release-bot
annotations:
description: S2I Relase-bot image builder
tags: release-bot s2i
iconClass: icon-python
labels:
template: release-bot
role: releasebot_application_builder
objects:
- kind : ImageStream
apiVersion : v1
metadata :
name : ${APP_NAME}
labels :
appid : release-bot-${APP_NAME}
- kind : ImageStream
apiVersion : v1
metadata :
name : ${APP_NAME}-s2i
labels :
appid : release-bot-${APP_NAME}
spec :
tags :
- name : latest
from :
kind : DockerImage
name : ${DOCKER_IMAGE}
importPolicy:
scheduled: true
- kind : BuildConfig
apiVersion : v1
metadata :
name : ${APP_NAME}
labels :
appid : release-bot-${APP_NAME}
spec :
triggers :
- type : ConfigChange
- type : ImageChange
source :
type : Git
git :
uri : ${CONFIGURATION_REPOSITORY}
contextDir : ${CONFIGURATION_REPOSITORY}
sourceSecret :
name : release-bot-secret
strategy :
type : Source
sourceStrategy :
from :
kind : ImageStreamTag
name : ${APP_NAME}-s2i:latest
output :
to :
kind : ImageStreamTag
name : ${APP_NAME}:latest
- kind : DeploymentConfig
apiVersion : v1
metadata :
name: ${APP_NAME}
labels :
appid : release-bot-${APP_NAME}
spec :
strategy :
type : Rolling
triggers :
- type : ConfigChange
- type : ImageChange
imageChangeParams :
automatic : true
containerNames :
- ${APP_NAME}
from :
kind : ImageStreamTag
name : ${APP_NAME}:latest
replicas : 1
selector :
deploymentconfig : ${APP_NAME}
template :
metadata :
labels :
appid: release-bot-${APP_NAME}
deploymentconfig : ${APP_NAME}
spec :
containers :
- name : ${APP_NAME}
image : ${APP_NAME}:latest
ports:
- containerPort: 8080
protocol: TCP
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
- kind: Service
apiVersion: v1
metadata:
name: release-bot
labels:
application: release-bot
annotations:
description: Exposes release-bot port for github webhook callbacks
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
selector:
deploymentconfig: ${APP_NAME}
- kind: Route
apiVersion: v1
metadata:
name: release-bot
labels:
application: release-bot
annotations:
description: Github webhook route to reach release-bot
spec:
to:
kind: Service
name: release-bot
parameters :
- name : APP_NAME
description : Name of application
value :
required : true
- name : CONFIGURATION_REPOSITORY
description : Git repository with configuration
value :
required : true
- name : DOCKER_IMAGE
description : DockerHub repository with release-bot development image
value : usercont/release-bot:dev
required : true