forked from user-cont/release-bot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
openshift-template.yml
107 lines (106 loc) · 2.59 KB
/
openshift-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
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 : usercont/release-bot:latest
#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
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
parameters :
- name : APP_NAME
description : Name of application
value :
required : true
- name : CONFIGURATION_REPOSITORY
description : Git repository with configuration
value :
required : true